diff --git a/Dockerfile b/Dockerfile index 1e4b70b..d106067 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,10 @@ # Use an official Python runtime as a parent image FROM python:3.11-slim -# Set working directory inside container -WORKDIR /app - -# Copy the Python script into the container -COPY backend/tcp_sia_server.py /app/ - COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt -# Expose the port your server listens on EXPOSE 9000 -# Run the script -CMD ["python", "backend/tcp_sia_server.py"] +CMD ["python", "/backend/tcp_sia_server.py"] diff --git a/docker-compose.yml b/docker-compose.yml index 2d18b95..935b5b1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,13 +30,14 @@ services: - ./frontend:/usr/share/nginx/html tcp_sia_server: - build: . + build: + context: . ports: - "9000:9000" volumes: - - ./:/app + - ./backend/:/app working_dir: /app - command: python -u tcp_sia_server.py + command: python -u /app/tcp_sia_server.py depends_on: - mariadb