-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
63 lines (57 loc) · 1.31 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
version: '3.8'
services:
db:
image: "postgres:13"
env_file: .env
restart: always
volumes:
- ./db-data:/var/lib/postgresql/data/
networks:
- db
bot:
build: .
restart: always
depends_on:
- db
env_file: .env
environment:
- DB_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@db:$POSTGRES_PORT/$POSTGRES_DATABASE
networks:
- db
command: /bin/sh start_bot.sh
site:
build: .
restart: always
depends_on:
- db
env_file: .env
environment:
- DB_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@db:$POSTGRES_PORT/$POSTGRES_DATABASE
networks:
- db
- caddy
labels:
caddy: scc-luhack.lancaster.ac.uk, scc-luhack.lancs.ac.uk
caddy.reverse_proxy: "{{upstreams 8080}}"
caddy.tls: "[email protected]"
command: /bin/sh start_site.sh
caddy:
image: lucaslorentz/caddy-docker-proxy:ci-alpine
restart: always
ports:
- 80:80
- 443:443
networks:
- caddy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# this volume is needed to keep the certificates
# otherwise, new ones will be re-issued upon restart
- caddy_data:/data
labels: # Global options
caddy.email: [email protected]
networks:
db:
caddy:
volumes:
caddy_data: {}