modify run filder

This commit is contained in:
2025-08-31 18:52:46 +03:00
parent 95ebc54a8a
commit 6bb0669e45
2 changed files with 10 additions and 16 deletions

View File

@@ -1,6 +1,5 @@
FROM python:3.12-slim FROM python:3.12-slim
# System deps: nginx & supervisor
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
nginx supervisor && \ nginx supervisor && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
@@ -8,30 +7,25 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
WORKDIR /app WORKDIR /app
# Python deps # Python deps
COPY transportmanager/requirements.txt /app/requirements.txt COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt RUN pip install --no-cache-dir -r /app/requirements.txt
# App code # App code
COPY transportmanager/server /app/server COPY server /app/server
COPY transportmanager/client /app/client COPY client /app/client
# Nginx config # Nginx & Supervisor configs
COPY transportmanager/deploy/nginx.conf /etc/nginx/nginx.conf COPY deploy/nginx.conf /etc/nginx/nginx.conf
COPY deploy/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Supervisor config RUN mkdir -p /var/run/nginx /app/server/instance
COPY transportmanager/deploy/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Nginx needs a pid file path
RUN mkdir -p /var/run/nginx
# Environment defaults
ENV TZ=Europe/Bucharest \ ENV TZ=Europe/Bucharest \
API_BIND=127.0.0.1:5000 \ API_BIND=127.0.0.1:5000 \
FLET_BIND=127.0.0.1:8080 \ FLET_BIND=127.0.0.1:8080 \
API_BASE_PATH=/api API_BASE_PATH=/api
# Expose only 80 internally (for nginx)
EXPOSE 80 EXPOSE 80
# Run all processes via supervisor # (You said we can omit the healthcheck for now)
CMD ["/usr/bin/supervisord","-c","/etc/supervisor/conf.d/supervisord.conf"] CMD ["/usr/bin/supervisord","-c","/etc/supervisor/conf.d/supervisord.conf"]

View File

@@ -3,8 +3,8 @@ version: "3.8"
services: services:
tms: tms:
build: build:
context: . # repo root (where transportmanager/ lives) context: . # context is the transportmanager/ folder
dockerfile: transportmanager/Dockerfile dockerfile: ./Dockerfile # Dockerfile is inside transportmanager/
image: tms:latest image: tms:latest
container_name: tms container_name: tms
restart: always restart: always