use tmpfs for non-persistent storage

This commit is contained in:
Zhi
2026-03-13 19:14:24 +00:00
parent 9b165a7bec
commit a74d422b60

View File

@@ -3,6 +3,8 @@ services:
image: mysql:8.0
container_name: harborforge-test-mysql
restart: "no"
tmpfs:
- /var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-harborforge_root}
MYSQL_DATABASE: ${MYSQL_DATABASE:-harborforge}
@@ -13,11 +15,6 @@ services:
interval: 10s
timeout: 5s
retries: 5
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
networks:
- test-network
@@ -36,11 +33,8 @@ services:
LISTEN_ADDR: "0.0.0.0:8080"
MAX_BACKUPS: "5"
CORS_ORIGINS: http://frontend:3000
deploy:
resources:
limits:
cpus: '0.1'
memory: 64M
ports:
- "18080:8080"
networks:
- test-network
@@ -51,28 +45,17 @@ services:
image: harborforge-test-backend:dev
container_name: harborforge-test-backend
restart: "no"
tmpfs:
- /config
environment:
CONFIG_DIR: /config
CONFIG_FILE: harborforge.json
SECRET_KEY: ${SECRET_KEY:-change_me_in_production}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
DATABASE_URL: mysql+pymysql://harborforge:harborforge_pass@mysql:3306/harborforge
tmpfs:
- /config
depends_on:
mysql:
condition: service_healthy
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- test-network
@@ -90,16 +73,6 @@ services:
depends_on:
- wizard
- backend
deploy:
resources:
limits:
cpus: '0.25'
memory: 128M
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
networks:
- test-network