Repository navigation
Expand file tree
/
Copy pathcompose.yml
More file actions
119 lines (112 loc) · 3.28 KB
/
Copy pathcompose.yml
File metadata and controls
119 lines (112 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
volumes:
cache:
services:
volume-init:
image: busybox:1.37.0-musl
user: root
volumes:
- cache:/cache
command:
- sh
- -c
- |
mkdir -p /cache/go-build
mkdir -p /cache/go-mod
mkdir -p /cache/golangci-lint
mkdir -p /cache/npm
chown -R ${FIXUID:-1000}:${FIXGID:-1000} /cache
go-builder:
profiles: ["build"]
user: ${FIXUID:-1000}:${FIXGID:-1000}
# Latest version: https://hub.docker.com/_/golang/tags
image: golang:1.27.2-trixie
working_dir: /src
environment:
GOCACHE: /cache/go-build
GOMODCACHE: /cache/go-mod
depends_on:
volume-init:
condition: service_completed_successfully
volumes:
- .:/src
- cache:/cache
goreleaser:
profiles: ["build"]
user: ${FIXUID:-1000}:${FIXGID:-1000}
# Latest version: https://hub.docker.com/r/goreleaser/goreleaser/tags
image: goreleaser/goreleaser:v2.19.0
working_dir: /src
environment:
GOCACHE: /cache/go-build
GOMODCACHE: /cache/go-mod
# The image pins GOTOOLCHAIN=local; `auto` lets go.mod stay the single
# toolchain pin, as it is for the release workflow.
GOTOOLCHAIN: auto
# Running as the host user leaves HOME at /, where git cannot write the
# safe.directory entry goreleaser adds for the mounted checkout.
HOME: /tmp
depends_on:
volume-init:
condition: service_completed_successfully
volumes:
- .:/src
- cache:/cache
node:
profiles: ["markdown"]
user: ${FIXUID:-1000}:${FIXGID:-1000}
# Latest version: https://hub.docker.com/_/node/tags
image: node:24.15.0-bookworm
working_dir: /src
environment:
NPM_CONFIG_CACHE: /cache/npm
depends_on:
volume-init:
condition: service_completed_successfully
volumes:
- .:/src
- cache:/cache
golangci-lint:
profiles: ["lint"]
user: ${FIXUID:-1000}:${FIXGID:-1000}
# Latest version: https://hub.docker.com/r/golangci/golangci-lint/tags
image: golangci/golangci-lint:v2.12.2-alpine
working_dir: /src
environment:
GOCACHE: /cache/go-build
GOMODCACHE: /cache/go-mod
GOLANGCI_LINT_CACHE: /cache/golangci-lint
depends_on:
volume-init:
condition: service_completed_successfully
volumes:
- .:/src
- cache:/cache
hugo:
profiles: ["docs"]
user: ${FIXUID:-1000}:${FIXGID:-1000}
# Latest version: https://hub.docker.com/r/hugomods/hugo/tags
# Keep in step with hugo-version in .github/workflows/docs.yml.
image: hugomods/hugo:debian-go-git-non-root-0.165.0
working_dir: /src/docs
environment:
GOCACHE: /cache/go-build
GOMODCACHE: /cache/go-mod
depends_on:
volume-init:
condition: service_completed_successfully
volumes:
- .:/src
- cache:/cache
ports:
- "1313:1313"
docs-preview:
profiles: ["docs"]
# nginx drops to its own unprivileged worker after binding port 80 and
# writing its pid, so this one service stays on the image's default user.
# Latest version: https://hub.docker.com/_/nginx/tags
image: nginx:1.31.8-alpine
volumes:
- ./docs/public:/usr/share/nginx/html:ro
- ./docs/nginx.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- "8080:80"