add docker compose file

This commit is contained in:
2025-08-31 18:46:32 +03:00
parent 3c420c1b7b
commit 95ebc54a8a
2 changed files with 31 additions and 9 deletions

View File

@@ -8,18 +8,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
WORKDIR /app
# Python deps
COPY requirements.txt /app/requirements.txt
COPY transportmanager/requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
# App code
COPY server /app/server
COPY client /app/client
COPY transportmanager/server /app/server
COPY transportmanager/client /app/client
# Nginx config
COPY deploy/nginx.conf /etc/nginx/nginx.conf
COPY transportmanager/deploy/nginx.conf /etc/nginx/nginx.conf
# Supervisor config
COPY deploy/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY transportmanager/deploy/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Nginx needs a pid file path
RUN mkdir -p /var/run/nginx
@@ -33,9 +33,5 @@ ENV TZ=Europe/Bucharest \
# Expose only 80 internally (for nginx)
EXPOSE 80
# Healthcheck (API ping)
HEALTHCHECK --interval=30s --timeout=5s --retries=5 CMD \
wget -qO- http://127.0.0.1/api/health || exit 1
# Run all processes via supervisor
CMD ["/usr/bin/supervisord","-c","/etc/supervisor/conf.d/supervisord.conf"]