-
Notifications
You must be signed in to change notification settings - Fork 164
/
docker-compose.yml
90 lines (79 loc) · 2.02 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
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
# before running docker-compose up for the first time,
# either do a pull:
# docker-compose pull
# or do a build:
# GIT_HASH $(git rev-parse --short HEAD) docker-compose up --detach
# subsequently you should only need to run:
# docker-compose up --detach
# force a full re-build with no cache from previous builds:
# docker-compose build --build-arg GIT_HASH $(git rev-parse --short HEAD) --parallel --no-cache
# to stop:
# docker-compose down
version: "3.4"
services:
server:
env_file: ./server/docker-dev.env
image: docker.io/compdem/polis-server:${TAG}
build:
context: ./server
dockerfile: Dockerfile
depends_on:
- "postgres"
- "file-server"
networks:
- "polis-net"
# Scale the server container to a given number of instances.
scale: 1
math:
container_name: polis-math
env_file: ./math/docker-dev.env
image: docker.io/compdem/polis-math:${TAG}
depends_on:
- "postgres"
build:
context: ./math
networks:
- "polis-net"
postgres:
container_name: polis-postgres
env_file: ./server/docker-db-dev.env
image: docker.io/compdem/polis-postgres:${TAG}
restart: always
build:
context: ./server
dockerfile: Dockerfile-db
networks:
- "polis-net"
volumes:
- "backups:/backups"
- "postgres:/var/lib/postgresql/data"
nginx-proxy:
container_name: polis-nginx-proxy
image: docker.io/compdem/polis-nginx-proxy:${TAG}
build:
context: ./file-server
dockerfile: nginx.Dockerfile
environment:
- TAG
depends_on:
- "server"
networks:
- "polis-net"
ports:
- ${HTTP_PORT:-80}:${HTTP_PORT:-80}
- ${HTTPS_PORT:-443}:${HTTPS_PORT:-443}
file-server:
container_name: polis-file-server
image: docker.io/compdem/polis-file-server:${TAG}
build:
context: ./
dockerfile: file-server/Dockerfile
args:
GIT_HASH: "${GIT_HASH}"
networks:
- "polis-net"
networks:
polis-net:
volumes:
backups:
postgres: