-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-local.yml
64 lines (59 loc) · 1.6 KB
/
docker-compose-local.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
59
60
61
62
63
64
version: '3'
services:
postgres:
image: 'w241-final-project/postgres'
build:
context: .
dockerfile: ./docker/db.dockerfile
environment: &db-connection-environment
POSTGRES_USERNAME: postgres
POSTGRES_PASSWORD: CHANGEME
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_DBNAME: postgres
volumes:
- db-data:/var/lib/postgresql/data
restart: always
rest_api:
build:
context: .
dockerfile: ./docker/python.dockerfile
image: 'w241-final-project/rest_api'
volumes:
- ./rest_api:/app
- ./rest_api/sql:/opt/sql
environment:
FLASK_ENV: development
<<: *db-connection-environment
depends_on:
- postgres
links:
- postgres
restart: always
frontend:
build:
context: .
dockerfile: ./docker/react.dockerfile
image: 'w241-final-project/frontend-dev'
volumes:
- ./frontend:/app
depends_on:
- rest_api
restart: always
nginx:
image: 'nginx:1.17.9-alpine'
ports:
- 80:80
- 443:443
depends_on:
- frontend
- rest_api
volumes:
- ./docker/files/nginx.conf:/etc/nginx/nginx.conf
- ./docker/files/ssl/:/etc/ssl/doolittle.dev/
links:
- frontend:frontend
- rest_api:rest_api
volumes:
db-data:
driver: local