-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (69 loc) · 1.55 KB
/
docker-compose.yml
File metadata and controls
73 lines (69 loc) · 1.55 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: grindify
services:
postgres:
image: postgres:17
container_name: grindify_postgres
ports:
- "${POSTGRES_PORT:-5432}:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
PGDATA: /var/lib/postgresql/data/17/main
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
volumes:
- postgres_data:/var/lib/postgresql/data
env_file:
- .env
backend:
build:
context: .
dockerfile: Dockerfile.api
container_name: grindify_backend
ports:
- "${BACKEND_PORT:-1337}:1337"
volumes:
- ./backend:/app
- /app/node_modules
- uploads_data:/app/uploads
depends_on:
postgres:
condition: service_healthy
env_file:
- .env
develop:
watch:
- action: sync
path: ./backend
target: /app
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
target: development
args:
VITE_API_URL: ${VITE_API_URL}
container_name: grindify_frontend
command: npm run dev -- --port 3000
ports:
- "${FRONTEND_PORT:-3000}:3000"
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- backend
env_file:
- .env
develop:
watch:
- action: sync
path: ./frontend
target: /app
volumes:
postgres_data:
uploads_data: