-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (56 loc) · 1.28 KB
/
docker-compose.yml
File metadata and controls
56 lines (56 loc) · 1.28 KB
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
services:
api:
build:
context: .
dockerfile: Dockerfile.api
image: amazon-clone-flask-api
command: bash -c "gunicorn server:create_app1"
environment:
- GUNICORN_BIND=0.0.0.0:5000
- GUNICORN_WORKERS=2
- GUNICORN_THREADS=4
- GUNICORN_TIMEOUT=0
- TWILIO_ACCOUNT_SID=${TWILIO_ACCOUNT_SID}
- TWILIO_AUTH_TOKEN=${TWILIO_AUTH_TOKEN}
- PGHOST=db
- PGDB=${PGDB}
- PGUSER=${PGUSER}
- PGPASS=${PGPASS}
- SECRET_KEY=${SECRET_KEY}
- STRIPE_API_KEY=${STRIPE_API_KEY}
- S3_BUCKET=${S3_BUCKET}
ports:
- "5000:5000"
depends_on:
- db
volumes:
- .:/app
client:
build:
context: .
dockerfile: Dockerfile.client
image: amazon-clone-flask-client
ports:
- "3000:3000"
db:
image: postgres:13-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_ADMIN=postgres
- POSTGRES_ADMIN_PASSWORD=${PG_ADMIN_PASS}
- POSTGRES_USER=${PGUSER}
- POSTGRES_PASSWORD=${PGPASS}
- POSTGRES_DB=${PGDB}
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
image: amazon-clone-flask-nginx
ports:
- 1337:80
depends_on:
- api
- client
volumes:
postgres_data: