remove cleanup in compose and docker

This commit is contained in:
Zeecka
2025-12-31 15:59:13 +01:00
parent 9c37efb403
commit 58edd54835
3 changed files with 8 additions and 12 deletions
+1 -1
View File
@@ -42,4 +42,4 @@ RUN apt-get remove -y wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
CMD ["sh", "-c", "rm -rf /aperisolve/results/* && gunicorn -w 4 -b 0.0.0.0:5000 --access-logfile - --error-logfile - --log-level info --capture-output aperisolve.wsgi:application"]
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "--access-logfile", "-", "--error-logfile", "-", "--log-level", "info", "--capture-output", "aperisolve.wsgi:application"]
+3 -6
View File
@@ -4,13 +4,12 @@ services:
build: .
container_name: aperisolve-web
restart: always
command: ["/bin/sh", "-c", "rm -rf /aperisolve/results/* && flask --app aperisolve.app run --host=0.0.0.0 --port=5000"]
#command: ["/bin/sh", "-c", "flask --app aperisolve.app run --host=0.0.0.0 --port=5000"]
command: ["/bin/sh", "-c", "flask --app aperisolve.app run --host=0.0.0.0 --port=5000"]
ports:
- "5000:5000"
volumes:
- ./aperisolve:/aperisolve
- apresults:/aperisolve/results # Shared named volume (renamed)
- apresults:/aperisolve/results
depends_on:
postgres:
condition: service_healthy
@@ -29,8 +28,7 @@ services:
build: .
container_name: aperisolve-worker
restart: always
command: ["/bin/sh", "-c", "rm -rf /aperisolve/results/* && rq worker default --url redis://redis:6379/0"]
#command: ["/bin/sh", "-c", "rq worker default --url redis://redis:6379/0"]
command: ["/bin/sh", "-c", "rq worker default --url redis://redis:6379/0"]
volumes:
- ./aperisolve:/aperisolve
- apresults:/aperisolve/results # Shared named volume (renamed)
@@ -54,7 +52,6 @@ services:
image: postgres:18
container_name: postgres
restart: always
entrypoint: ["/bin/sh", "-c", "rm -rf /var/lib/postgresql/* && docker-entrypoint.sh postgres"]
volumes:
- pgdata:/var/lib/postgresql
healthcheck:
+4 -5
View File
@@ -6,8 +6,8 @@ services:
restart: always
ports:
- "5000:5000"
tmpfs:
- /aperisolve/results
volumes:
- apresults:/aperisolve/results
depends_on:
postgres:
condition: service_healthy
@@ -30,8 +30,8 @@ services:
container_name: aperisolve-worker
restart: always
command: rq worker default --url redis://redis:6379/0
tmpfs:
- /aperisolve/results
volumes:
- apresults:/aperisolve/results
depends_on:
- redis
- postgres
@@ -42,7 +42,6 @@ services:
image: postgres:18
container_name: postgres
restart: always
entrypoint: ["/bin/sh", "-c", "rm -rf /var/lib/postgresql/* && docker-entrypoint.sh postgres"]
volumes:
- pgdata:/var/lib/postgresql
healthcheck: