-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (47 loc) · 1.25 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
version: "3"
services:
postgres:
image: postgres
container_name: postgres
restart: always
ports:
- 5432:5432
environment:
- POSTGRES_DB=onlinejudge
- POSTGRES_PASSWORD=password
networks:
- staoj
backend:
build: .
container_name: onlinejudge
restart: always
depends_on:
- postgres
links:
- postgres
environment:
- DATABASE_URL=postgresql://postgres:password@postgres/postgres
ports:
- 5000:5000
networks:
- staoj
nginx:
image: nginx:alpine
container_name: nginx
restart: unless-stopped
tty: true
volumes:
- ./deployment/nginx.conf:/etc/nginx/conf.d/default.conf
- /etc/letsencrypt/live/staoj.com/fullchain.pem:/etc/letsencrypt/live/staoj.com/fullchain.pem
- /etc/letsencrypt/live/staoj.com/privkey.pem:/etc/letsencrypt/live/staoj.com/privkey.pem
- ./app/static:/static
ports:
- 80:80
- 443:443
links:
- backend
networks:
- staoj
networks:
staoj:
driver: bridge