-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-dev.yml
53 lines (49 loc) · 1.28 KB
/
docker-compose-dev.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
version: '3.8'
services:
backend:
container_name: backend
build:
context: ./services/backend/
dockerfile: Dockerfile-dev
command: bash -c "python manage.py run -h 0.0.0.0"
volumes:
- ./services/backend/:/usr/src/app/
ports:
- 5001:5000
environment:
- FLASK_APP=project/__init__.py
- FLASK_DEBUG=1
- APP_SETTINGS=project.config.DevelopmentConfig
- DATABASE_URL=postgresql://postgres:postgres@backend-db:5432/backend_dev
- DATABASE_TEST_URL=postgresql://postgres:postgres@backend-db:5432/backend_test
depends_on:
- backend-db
backend-db:
image: postgres:16
container_name: backend-db
build:
context: ./services/postgres/
dockerfile: Dockerfile
volumes:
- postgres_volume:/var/lib/postgresql/data
ports:
- 5435:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=backend_dev
client:
container_name: my-app
build:
context: ./services/client/my-app/
dockerfile: Dockerfile-dev2
ports:
- "3001:3000"
volumes:
- ./services/client/my-app:/usr/src/app
- /usr/src/app/node_modules
environment:
- NODE_ENV=development
command: npm start
volumes:
postgres_volume: