-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
58 lines (54 loc) · 1.17 KB
/
docker-compose.prod.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
services:
angular:
container_name: angular-prod
image: matcha/prod-angular
build:
context: ./frontend/
dockerfile: Dockerfile.prod
ports:
- '80:80'
volumes:
- uploads:/usr/share/nginx/uploads
depends_on:
- flask
networks:
- appnet
flask:
container_name: flask-prod
image: matcha/prod-flask
build:
context: ./backend/
dockerfile: Dockerfile.prod
volumes:
- ./backend:/app
- uploads:/app/uploads
environment:
- FLASK_APP=app.py
- FLASK_ENV=production
- PYTHONUNBUFFERED=1
env_file:
- .env
command: gunicorn --bind 0.0.0.0:5000 app:app
depends_on:
- postgres
networks:
- appnet
postgres:
container_name: postgres-prod
image: postgres:latest
volumes:
- data:/var/lib/postgresql/data
- ./postgres-init:/docker-entrypoint-initdb.d
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_NAME}
networks:
- appnet
volumes:
data:
name: postgres-volume-prod
uploads:
name: uploads-volume-prod
networks:
appnet: