-
Notifications
You must be signed in to change notification settings - Fork 33
/
docker-compose.yml
63 lines (59 loc) · 1.42 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: "3.7"
services:
postgres:
image: postgres:15-alpine
restart: always
environment:
POSTGRES_USER: dev-user
POSTGRES_PASSWORD: password
POSTGRES_DB: dev_db
ports:
- 5432:5432
expose:
- "5432"
volumes:
- db-data:/var/lib/postgresql/data:cached
test-postgres:
image: postgres:15-alpine
restart: always
environment:
POSTGRES_USER: test-user
POSTGRES_PASSWORD: password
POSTGRES_DB: test_db
ports:
- 5434:5432 # Use a different port to avoid conflicts with the main database
expose:
- "5434" # Exposing the different port for clarity
volumes:
- test-db-data:/var/lib/postgresql/data:cached
backend:
build:
context: backend
dockerfile: Dockerfile
command: python app/main.py
tty: true
volumes:
- ./backend:/backend/:cached
- ./.docker/.ipython:/root/.ipython:cached
environment:
PYTHONPATH: .
DATABASE_URL: "postgresql+asyncpg://dev-user:password@postgres:5432/dev_db"
depends_on:
- "postgres"
ports:
- 8000:8000
# frontend:
# build:
# context: frontend
# dockerfile: Dockerfile
# stdin_open: true
# volumes:
# - "./frontend:/app:cached"
# - "./frontend/node_modules:/app/node_modules:cached"
# environment:
# - NODE_ENV=development
# ports:
# - 3000:3000
volumes:
db-data:
test-db-data: