-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
49 lines (47 loc) · 1.26 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
# Elastic Beanstalk 用の docker-compose.yml
version: '3'
services:
flask:
image: 633999724589.dkr.ecr.us-west-2.amazonaws.com/portfolio-flask-backend_flask:latest
container_name: portfolio-flask
tty: true
working_dir: /usr/src/app/
volumes:
- ./app:/usr/src/app/
environment:
RDS_HOSTNAME: ${RDS_HOSTNAME}
RDS_PORT: ${RDS_PORT}
RDS_USERNAME: ${RDS_USERNAME}
RDS_PASSWORD: ${RDS_PASSWORD}
RDS_DB_NAME: ${RDS_DB_NAME}
FLASK_APP: 'application:app'
FLASK_CONFIG: ${FLASK_CONFIG}
restart: always
ports:
- 5000:5000
expose:
- 5000
logging:
driver: awslogs
options:
awslogs-region: us-west-2
awslogs-group: eb-flask-docker-log
awslogs-create-group: "true"
awslogs-stream: flask
command: /bin/sh -c "/usr/src/app/migrate.sh && gunicorn -c gunicorn_settings.py application:app"
web:
image: nginx
container_name: portfolio-web
ports:
- 80:80
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
logging:
driver: awslogs
options:
awslogs-region: us-west-2
awslogs-group: eb-nginx-docker-log
awslogs-create-group: "true"
awslogs-stream: nginx
depends_on:
- flask