fix: persist media decisions across production restores
This commit is contained in:
@@ -123,6 +123,7 @@ services:
|
||||
S3_ACCESS_KEY: ${S3_ACCESS_KEY:?Set S3_ACCESS_KEY}
|
||||
S3_SECRET_KEY: ${S3_SECRET_KEY:?Set S3_SECRET_KEY}
|
||||
S3_BUCKET: ${S3_BUCKET:-catch-screenshots}
|
||||
MEDIA_ROOT: /app/runtime-media
|
||||
OFFICIAL_RECORDS_URL: ${OFFICIAL_RECORDS_URL:-https://rf4game.de/records/region/RU/}
|
||||
OFFICIAL_RECORDS_REGION: ${OFFICIAL_RECORDS_REGION:-RU}
|
||||
OFFICIAL_RECORDS_CATEGORY: ${OFFICIAL_RECORDS_CATEGORY:-records}
|
||||
@@ -144,6 +145,7 @@ services:
|
||||
migrate: {condition: service_completed_successfully}
|
||||
minio: {condition: service_healthy}
|
||||
minio-init: {condition: service_completed_successfully}
|
||||
media-init: {condition: service_completed_successfully}
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/ready')"]
|
||||
interval: 10s
|
||||
@@ -152,6 +154,8 @@ services:
|
||||
networks: [backend, edge]
|
||||
security_opt: [no-new-privileges:true]
|
||||
logging: *default-logging
|
||||
volumes:
|
||||
- media_data:/app/runtime-media
|
||||
deploy:
|
||||
resources:
|
||||
limits: {cpus: "1.00", memory: 1G}
|
||||
@@ -173,6 +177,19 @@ services:
|
||||
resources:
|
||||
limits: {cpus: "0.50", memory: 256M}
|
||||
|
||||
media-init:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: apps/api/Dockerfile
|
||||
restart: "no"
|
||||
user: "0:0"
|
||||
command: ["sh", "-c", "python -c \"from pathlib import Path; from rf4_research.media_store import bootstrap_media_store; print(bootstrap_media_store(Path('/app/data/media'), Path('/app/runtime-media')))\" && chown -R 10001:10001 /app/runtime-media"]
|
||||
volumes:
|
||||
- media_data:/app/runtime-media
|
||||
networks: [backend]
|
||||
security_opt: [no-new-privileges:true]
|
||||
logging: *default-logging
|
||||
|
||||
web:
|
||||
build:
|
||||
context: ./apps/web
|
||||
@@ -249,5 +266,6 @@ networks:
|
||||
volumes:
|
||||
postgres_data:
|
||||
minio_data:
|
||||
media_data:
|
||||
caddy_data:
|
||||
caddy_config:
|
||||
|
||||
Reference in New Issue
Block a user