-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (45 loc) · 1.43 KB
/
docker-compose.yml
File metadata and controls
47 lines (45 loc) · 1.43 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
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: educative-backend
restart: unless-stopped
environment:
PORT: 4000
DB_PATH: /app/data/educative_tracker.db
FRONTEND_ORIGIN: http://localhost:8080
JWT_ACCESS_SECRET: ${JWT_ACCESS_SECRET:-replace-with-long-random-secret}
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET:-replace-with-different-long-random-secret}
JWT_ACCESS_EXPIRES_IN: ${JWT_ACCESS_EXPIRES_IN:-15m}
JWT_REFRESH_EXPIRES_IN: ${JWT_REFRESH_EXPIRES_IN:-7d}
JWT_ISSUER: ${JWT_ISSUER:-educative-tracker}
JWT_AUDIENCE: ${JWT_AUDIENCE:-educative-tracker-api}
BCRYPT_SALT_ROUNDS: ${BCRYPT_SALT_ROUNDS:-10}
PASSWORD_RESET_TOKEN_TTL_MINUTES: ${PASSWORD_RESET_TOKEN_TTL_MINUTES:-30}
EXPOSE_RESET_TOKEN: ${EXPOSE_RESET_TOKEN:-true}
volumes:
- educative_db_data:/app/data
ports:
- "4000:4000"
command: sh -c "npm run migrate && npm run start"
healthcheck:
test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:4000/api/health"]
interval: 15s
timeout: 5s
retries: 5
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
VITE_API_URL: /api
container_name: educative-frontend
restart: unless-stopped
depends_on:
backend:
condition: service_healthy
ports:
- "8080:8080"
volumes:
educative_db_data: