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 image: mysql:8.0
container_name: harborforge-test-mysql container_name: harborforge-test-mysql
restart: "no" restart: "no"
tmpfs:
- /var/lib/mysql
environment: environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-harborforge_root} MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-harborforge_root}
MYSQL_DATABASE: ${MYSQL_DATABASE:-harborforge} MYSQL_DATABASE: ${MYSQL_DATABASE:-harborforge}
@@ -13,11 +15,6 @@ services:
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
networks: networks:
- test-network - test-network
@@ -36,11 +33,8 @@ services:
LISTEN_ADDR: "0.0.0.0:8080" LISTEN_ADDR: "0.0.0.0:8080"
MAX_BACKUPS: "5" MAX_BACKUPS: "5"
CORS_ORIGINS: http://frontend:3000 CORS_ORIGINS: http://frontend:3000
deploy: ports:
resources: - "18080:8080"
limits:
cpus: '0.1'
memory: 64M
networks: networks:
- test-network - test-network
@@ -51,28 +45,17 @@ services:
image: harborforge-test-backend:dev image: harborforge-test-backend:dev
container_name: harborforge-test-backend container_name: harborforge-test-backend
restart: "no" restart: "no"
tmpfs:
- /config
environment: environment:
CONFIG_DIR: /config CONFIG_DIR: /config
CONFIG_FILE: harborforge.json CONFIG_FILE: harborforge.json
SECRET_KEY: ${SECRET_KEY:-change_me_in_production} SECRET_KEY: ${SECRET_KEY:-change_me_in_production}
LOG_LEVEL: ${LOG_LEVEL:-INFO} LOG_LEVEL: ${LOG_LEVEL:-INFO}
DATABASE_URL: mysql+pymysql://harborforge:harborforge_pass@mysql:3306/harborforge DATABASE_URL: mysql+pymysql://harborforge:harborforge_pass@mysql:3306/harborforge
tmpfs:
- /config
depends_on: depends_on:
mysql: mysql:
condition: service_healthy 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: networks:
- test-network - test-network
@@ -90,16 +73,6 @@ services:
depends_on: depends_on:
- wizard - wizard
- backend - 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: networks:
- test-network - test-network