-
-
Notifications
You must be signed in to change notification settings - Fork 175
Expand file tree
/
Copy pathdev.docker-compose.yml
More file actions
72 lines (72 loc) · 2.47 KB
/
dev.docker-compose.yml
File metadata and controls
72 lines (72 loc) · 2.47 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
services:
backend:
build:
context: .
dockerfile_inline: |
FROM gradle:9.4.1-jdk25-alpine
RUN apk add --no-cache libstdc++ libgcc libarchive
RUN ln -s /usr/lib/libarchive.so.13 /usr/lib/libarchive.so
command: sh -c "cd /backend && ./gradlew bootRun"
ports:
- "${BACKEND_PORT:-6060}:6060"
- "127.0.0.1:${REMOTE_DEBUG_PORT:-5005}:5005"
environment:
- DATABASE_URL=jdbc:mariadb://backend_db:3306/grimmory
- DATABASE_USERNAME=grimmory
- DATABASE_PASSWORD=grimmory
- REMOTE_DEBUG_ENABLED=true
- ALLOWED_ORIGINS=http://localhost:4200
- API_DOCS_ENABLED=true
- JAVA_TOOL_OPTIONS=-XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact -XX:+UseCompactObjectHeaders -XX:MaxRAMPercentage=60.0 -XX:InitialRAMPercentage=8.0 -XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/heapdump.hprof -XX:MaxMetaspaceSize=256m -XX:ReservedCodeCacheSize=48m -Xss512k -XX:CICompilerCount=2 -XX:+UnlockExperimentalVMOptions -XX:+UseStringDeduplication -XX:ShenandoahUncommitDelay=5000 -XX:ShenandoahGuaranteedGCInterval=30000 -XX:MaxDirectMemorySize=256m
stdin_open: true
tty: true
restart: unless-stopped
depends_on:
- backend_db
volumes:
- './backend:/backend'
- /backend/build
- /backend/.gradle
- ./shared/data:/app/data
- ./shared/books:/books
- ./shared/bookdrop:/bookdrop
frontend:
image: node:24-alpine
command: |-
sh -c "\
apk update && apk add --no-cache bash just;\
cd /angular-app &&\
corepack enable &&\
corepack yarn install --immutable &&\
corepack yarn ng serve --host 0.0.0.0 --watch --configuration development"
environment:
- NODE_ENV=development
stdin_open: true
tty: true
restart: unless-stopped
volumes:
- './frontend:/angular-app'
- node_modules:/angular-app/node_modules
ports:
- "${FRONTEND_PORT:-4200}:4200"
backend_db:
image: mariadb:11.4
container_name: backend_db
volumes:
- backend_db:/var/lib/mysql
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=grimmory
- MYSQL_DATABASE=grimmory
- MYSQL_USER=grimmory
- MYSQL_PASSWORD=grimmory
ports:
- "${DB_PORT:-3366}:3306"
healthcheck:
test: ["CMD", "mariadb-admin", "ping", "-h", "localhost", "-uroot", "-pgrimmory"]
interval: 10s
timeout: 5s
retries: 5
volumes:
node_modules:
backend_db: