-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (44 loc) · 997 Bytes
/
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
version: "3"
# todo certbot
services:
server:
build: ./server
restart: always
networks:
- database
- api
depends_on:
- postgres
expose:
- 8080
postgres:
image: postgres:alpine
restart: always
networks:
- database
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: synergy
volumes:
- /var/lib/docker/postgres:/var/lib
nginx:
image: nginx:latest
networks:
- api
ports:
- '80:80'
- '443:443'
environment:
NGINX_HOST: localhost # TODO
volumes:
- ./nginx.conf.template:/etc/nginx/conf.d/config.template
- ./client/build:/srv/www:ro
- /etc/certs:/etc/letsencrypt/live/ico.fastr.biz:ro
depends_on:
- server
restart: always
command: /bin/bash -c "envsubst \'$NGINX_HOST\' < /etc/nginx/conf.d/config.template > /etc/nginx/nginx.conf && nginx -g 'daemon off;'"
networks:
database:
api: