generated from hatchways/flask-starter
-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
48 lines (42 loc) · 1.07 KB
/
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
version: '3.7'
services:
client: # Service Name
container_name: client #container name
# Specify where the Dockerfile to build
build: ./client
volumes:
- './client:/usr/src/app'
- '/usr/src/app/node_modules'
ports:
- 3000:3000
environment:
- NODE_ENV=development
# The keyword 'network_mode' is used to define the network type.
# Here we define that the container can access to the 'localhost' of the computer.
network_mode: host
server:
container_name: server
build: ./server
command: python manage.py run -h 0.0.0.0
volumes:
- ./server:/usr/src/app/
ports:
- 5000:5000
environment:
- APP_SETTINGS=project.config.DevelopmentConfig
env_file:
- "~/team-matcha-secrets.env"
depends_on:
- postgres-db
postgres-db: #service name
container_name: db
build:
context: ./server/project/db
dockerfile: Dockerfile
ports:
- 5435:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
volumes:
postgres_data: