-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
43 lines (43 loc) · 1.14 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
version: '3'
services:
app:
restart: always
build: ./app
expose:
- "8080"
ports:
- "8080:8080"
# in order to use unicorn we need to change the command
# -w referes to number of wrokers
# -b specifies port
command: '/usr/local/bin/gunicorn -b :8080 app:app'
links:
- nginx
- db:database
nginx:
restart: always
image: nginx
expose:
- "8080"
ports:
- "80:80"
volumes:
- ./nginx/flask_app.conf:/etc/nginx/conf.d/default.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
# data:
# restart: always
# image: postgres
# volumes:
# - /var/lib/postgresql
# command: "true"
db:
restart: always
image: postgres
volumes:
- /home/willfritz/Documents/DataMachines/FlaskApp-in-Docker/data:/var/lib/postgresql
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgres