-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
47 lines (46 loc) · 1.09 KB
/
docker-compose.yaml
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
version: '3.7'
services:
backend:
build:
context: .
dockerfile: ./syuichi/Dockerfile
stop_signal: SIGINT
ports:
- "8000:8000"
volumes:
- ./syuichi:/usr/src/app/backend/syuichi
- ./pyproject.toml:/usr/src/app/backend/pyproject.toml
- ./poetry.lock:/usr/src/app/backend/poetry.lock
- ./requirements.txt:/usr/src/app/backend/requirements.txt
- /var/run/docker.sock:/var/run/docker.sock
env_file:
- .env
depends_on:
db:
condition: service_healthy
init: true
environment:
- DATABASE_URL=psql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST:-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB}
db:
image: marusoftware/postgres:15-alpine
volumes:
- postgres:/var/lib/postgresql/data
env_file:
- .env
ports:
- "5432:5432"
healthcheck:
test: "pg_isready -U $$POSTGRES_USER"
interval: 2s
timeout: 5s
retries: 5
frontend:
build: .
ports:
- "3000:3000"
volumes:
- ./:/app
- /app/node_modules
init: true
volumes:
postgres: