-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (44 loc) · 877 Bytes
/
docker-compose.yml
File metadata and controls
48 lines (44 loc) · 877 Bytes
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
version: '3.8'
services:
# Production application server
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- PORT=8080
- GRAPHQL_PLAYGROUND=false
networks:
- bian-network
# Development service with hot reload
dev:
image: golang:1.22-alpine
working_dir: /app
ports:
- "8080:8080"
volumes:
- .:/app
- go-modules:/go/pkg/mod
- go-build-cache:/root/.cache/go-build
environment:
- PORT=8080
- GRAPHQL_PLAYGROUND=true
- CGO_ENABLED=0
command: |
sh -c "
apk add --no-cache git &&
go install github.com/cosmtrek/air@latest &&
air
"
networks:
- bian-network
volumes:
go-modules:
driver: local
go-build-cache:
driver: local
networks:
bian-network:
driver: bridge