-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (48 loc) · 1.23 KB
/
docker-compose.yml
File metadata and controls
52 lines (48 loc) · 1.23 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
49
50
51
52
version: '3.8'
services:
db:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "${DB_PORT}:5432"
backend:
build:
context: ./backend
restart: unless-stopped
env_file:
- ./.env
environment:
- DATABASE_URL=${DATABASE_URL}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- SECRET_KEY=${SECRET_KEY}
- BASE_URL=${BACKEND_URL}
- FRONTEND_URL=${FRONTEND_URL}
depends_on:
- db
ports:
- "${BACKEND_PORT}:${BACKEND_PORT}"
command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "${BACKEND_PORT}"]
frontend:
build:
context: ./frontend
args:
- VITE_API_BASE_URL=${VITE_API_BASE_URL}
restart: unless-stopped
env_file:
- ./.env
environment:
- VITE_API_BASE_URL=${VITE_API_BASE_URL}
depends_on:
- backend
ports:
- "${FRONTEND_PORT}:${FRONTEND_PORT}"
command: ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "${FRONTEND_PORT}"]
volumes:
db_data: