-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
127 lines (119 loc) · 3.04 KB
/
Copy pathcompose.yml
File metadata and controls
127 lines (119 loc) · 3.04 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
120
121
122
123
124
125
126
127
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}
build:
context: .
dockerfile: Dockerfile
target: builder-download
environment:
GOCACHE: /cache/go-build
GOMODCACHE: /cache/go-mod
depends_on:
volume-init:
condition: service_completed_successfully
volumes:
- .:/src
- cache:/cache
go-binary:
profiles: ["build"]
user: ${FIXUID:-1000}:${FIXGID:-1000}
build:
context: .
dockerfile: Dockerfile
target: export
environment:
GOCACHE: /cache/go-build
GOMODCACHE: /cache/go-mod
depends_on:
volume-init:
condition: service_completed_successfully
volumes:
- cache:/cache
goreleaser:
profiles: ["build"]
user: ${FIXUID:-1000}:${FIXGID:-1000}
# Latest version: https://hub.docker.com/r/goreleaser/goreleaser/tags
image: goreleaser/goreleaser:v2.15.1
working_dir: /src
environment:
GOCACHE: /cache/go-build
GOMODCACHE: /cache/go-mod
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
image: hugomods/hugo:debian-go-git-non-root-0.161.1
working_dir: /src/docs
environment:
GOCACHE: /cache/go-build
GOMODCACHE: /cache/go-mod
volumes:
- .:/src
- cache:/cache
depends_on:
volume-init:
condition: service_completed_successfully
ports:
- "1313:1313"
docs-preview:
profiles: ["docs"]
user: ${FIXUID:-1000}:${FIXGID:-1000}
image: nginx:alpine
volumes:
- ./docs/public:/usr/share/nginx/html:ro
- ./docs/nginx.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- "8080:80"
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