-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (47 loc) · 1019 Bytes
/
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
51
# Docker Compose
# https://docs.docker.com/compose/
# Usage: docker-compose up
---
version: '3.6'
services:
app:
ports:
- '8000:8000'
build:
context: .
dockerfile: provision/docker/app/Dockerfile
depends_on:
- db
environment: &environment
- AWS_REGION=us-east-1
- AWS_DEFAULT_REGION=us-east-1
- DB_URL=postgresql+psycopg2://postgres:postgres@db:5432/air-pollution
volumes:
- .:/usr/src
env_file:
- .env
# PostgreSQL database.
db:
restart: always
image: postgres:11
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=air-pollution
volumes:
- db:/var/lib/postgresql/data # Using the declared volume.
- .:/usr/src
env_file: .env
zappa:
environment: *environment
build:
context: .
dockerfile: provision/docker/zappa/Dockerfile
args:
stage: prod
volumes:
- .:/usr/src
env_file:
- .env
volumes:
db: