-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
51 lines (51 loc) · 1.27 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
version: "3"
name: zeno
services:
frontend:
container_name: zeno-frontend
build:
context: ./frontend
dockerfile: Dockerfile.dev
volumes:
- ./frontend:/app
- /app/node_modules/
ports:
- "5173:5173"
command: ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
backend:
container_name: zeno-backend
build:
context: ./backend
dockerfile: Dockerfile.dev
env_file:
- ./frontend/.env
ports:
- "8000:8000"
volumes:
- ./backend:/app
- /app/.venv/
depends_on:
- postgres
environment:
BACKEND_HOST: 0.0.0.0
BACKEND_PORT: 8000
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: zeno
DB_USER: myuser
DB_PASSWORD: mypassword
command: poetry run uvicorn --factory zeno_backend.server:get_server --reload --host 0.0.0.0
postgres:
container_name: zeno-postgres
image: postgres:latest
environment:
POSTGRES_DB: zeno
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
volumes:
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
# Uncomment to enable logging of every SQL statement
# command: "-c log_statement=all"
ports:
# Use a different port to avoid clashes with local postgres
- "5431:5432"