-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (47 loc) · 1.05 KB
/
docker-compose.yml
File metadata and controls
48 lines (47 loc) · 1.05 KB
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'
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: wiki-backend
command: bash -c "cd ../ && alembic upgrade head && cd src/ && uvicorn main:app --reload --host 0.0.0.0 --port 8000"
ports:
- "8000:8000"
volumes:
- "./backend/src:/src"
- "./backend/requirements:/requirements"
- "./backend/alembic:/alembic"
- "./backend/alembic.ini:/alembic.ini"
depends_on:
db:
condition: service_healthy
env_file:
- envs/.env
db:
image: "postgres:15.6"
container_name: wiki-db
restart: always
ports:
- "5432:5432"
env_file:
- envs/.env
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 1s
timeout: 3s
retries: 30
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: wiki-frontend
command: npm run dev
ports:
- "3000:3000"
volumes:
- ./frontend:/app
env_file:
- envs/.env
volumes:
pgdata: