Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
107 lines (102 loc) · 2.99 KB
/
Copy pathdocker-compose.yml
File metadata and controls
107 lines (102 loc) · 2.99 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
services:
postgres:
image: postgres:16-alpine
container_name: elearning-postgres
restart: always
environment:
POSTGRES_DB: elearning
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "127.0.0.1:5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: elearning-redis
restart: always
ports:
- "127.0.0.1:6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
minio:
image: minio/minio:latest
container_name: elearning-minio
restart: always
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- "127.0.0.1:9000:9000"
- "127.0.0.1:9001:9001"
volumes:
- minio_data:/data
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: elearning-backend
restart: always
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/elearning
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
SPRING_DATA_REDIS_HOST: redis
SPRING_DATA_REDIS_PORT: 6379
JWT_SECRET: ${JWT_SECRET:?JWT_SECRET is required - create .env with output of openssl rand -base64 32}
# School time zone: exam schedules and deadlines are compared against this clock (WIB by default).
TZ: ${APP_TIMEZONE:-Asia/Jakarta}
STORAGE_UPLOAD_DIR: /app/storage/uploads
APP_DEMO_MODE: ${APP_DEMO_MODE:-false}
# Local stack is served over plain HTTP, so the refresh-token cookie cannot be Secure here.
APP_REFRESH_COOKIE_SECURE: ${APP_REFRESH_COOKIE_SECURE:-false}
LOG_LEVEL_APP: ${LOG_LEVEL_APP:-DEBUG}
ports:
- "127.0.0.1:8080:8080"
volumes:
- backend_storage:/app/storage/uploads
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/actuator/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
VITE_UMAMI_SCRIPT_URL: ${VITE_UMAMI_SCRIPT_URL:-}
VITE_UMAMI_WEBSITE_ID: ${VITE_UMAMI_WEBSITE_ID:-}
VITE_GA_MEASUREMENT_ID: ${VITE_GA_MEASUREMENT_ID:-}
container_name: elearning-frontend
restart: always
environment:
CSP_SCRIPT_SRC_EXTRA: ${CSP_SCRIPT_SRC_EXTRA:-}
CSP_CONNECT_SRC_EXTRA: ${CSP_CONNECT_SRC_EXTRA:-}
ports:
- "127.0.0.1:80:80"
depends_on:
backend:
condition: service_healthy
volumes:
postgres_data:
redis_data:
minio_data:
backend_storage: