-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (59 loc) · 1.36 KB
/
docker-compose.yml
File metadata and controls
63 lines (59 loc) · 1.36 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
version: "3.9"
services:
nginx:
container_name: mg-nginx
image: mg-nginx
build:
context: .
dockerfile: ./nginx/Dockerfile
ports:
- "80:80"
- "443:443"
restart: always
command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
depends_on:
- server
networks:
- common
server:
container_name: mg-server
image: mg-server
env_file:
- ./.env
build:
context: .
args:
server_port: $SERVER_PORT
postgres_port: $POSTGRES_PORT
postgres_host: $POSTGRES_HOST
postgres_user: $POSTGRES_USER
postgres_password: $POSTGRES_PASSWORD
restart: always
ports:
- "9000:9000"
depends_on:
- pg-14
networks:
- common
pg-14:
env_file:
- ./.env
image: postgres:14
ports:
- "5432:5432"
volumes:
- ./db/db-init:/docker-entrypoint-initdb.d
- ./db/db-data:/var/lib/postgresql/data
- ./db/db-backups:/backup
networks:
- common
adminer:
image: adminer
restart: always
ports:
- "8080:8080"
networks:
- common
networks:
common:
driver: bridge