-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
60 lines (58 loc) · 1.2 KB
/
docker-compose.yaml
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
version: '3'
services:
app-backend:
image: go-fiber-boilerplate:1.0.0
container_name: go-fiber-boilerplate
build: .
restart: on-failure
env_file:
- ./.env
environment:
- PORT=${PORT}
- JWT_SECRET=${JWT_SECRET}
- GO_ENV=${GO_ENV}
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
- DB_NAME=${DB_NAME}
- DB_SSL=${DB_SSL}
ports:
- ${PORT}:${PORT}
volumes:
- app-backend:/app
depends_on:
- postgres
networks:
- app-backend
postgres:
image: postgres:15
container_name: postgres-boilerplate
env_file:
- ./.env
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
- POSTGRES_DB=${DB_NAME}
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql/data
- ./initdb.d/migrations:/docker-entrypoint-initdb.d/
networks:
- app-backend
nginx:
build: ./nginx
ports:
- '90:80'
depends_on:
- app-backend
networks:
- app-backend
volumes:
app-backend:
postgres:
networks:
app-backend:
driver: bridge