-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (57 loc) · 1.15 KB
/
docker-compose.yml
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
version: "3.8"
services:
web:
container_name: golang-web
build: .
ports:
- "3001:3001"
restart: "always"
networks:
- "web.network"
volumes:
- .:/usr/src/app
command: air ./cmd/main.go -b 0.0.0.0
db:
container_name: db-postgres
image: postgres:alpine
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
ports:
- "5432:5432"
networks:
- "web.network"
volumes:
- postgres-db:/var/lib/postgresql/data
pgadmin:
container_name: pgadmin4
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: root
depends_on:
- web
ports:
- "5050:80"
networks:
- "web.network"
nginx:
container_name: server-nginx
image: nginx:latest
volumes:
- staticdata:/usr/src/app/public/
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- web
ports:
- "80:80"
networks:
- "web.network"
restart: "always"
networks:
web.network:
volumes:
staticdata:
postgres-db: