diff --git a/Caddyfile b/Caddyfile index 6af7b05..4878da5 100644 --- a/Caddyfile +++ b/Caddyfile @@ -14,6 +14,8 @@ handle_path /api/* { reverse_proxy * portfolio-backend:3001 + reverse_proxy * backend:3001 + } } handle * { diff --git a/backend.Dockerfile b/production.backend.Dockerfile similarity index 100% rename from backend.Dockerfile rename to production.backend.Dockerfile diff --git a/docker-compose.yml b/production.docker-compose.yml similarity index 64% rename from docker-compose.yml rename to production.docker-compose.yml index 7d00260..ac8620a 100644 --- a/docker-compose.yml +++ b/production.docker-compose.yml @@ -3,12 +3,12 @@ version: "3" services: - portfolio-frontend: - container_name: portfolio-frontend + frontend: + container_name: frontend restart: unless-stopped build: context: . - dockerfile: ./frontend.Dockerfile + dockerfile: ./production.frontend.Dockerfile args: CUSTOM_UID: 1000 CUSTOM_GID: 1000 @@ -16,12 +16,12 @@ services: TZ: Europe/Berlin ports: - "8000:3000" - portfolio-backend: - container_name: portfolio-backend + backend: + container_name: backend restart: unless-stopped build: context: . - dockerfile: ./backend.Dockerfile + dockerfile: ./production.backend.Dockerfile args: CUSTOM_UID: 1000 CUSTOM_GID: 1000 diff --git a/frontend.Dockerfile b/production.frontend.Dockerfile similarity index 94% rename from frontend.Dockerfile rename to production.frontend.Dockerfile index b803ccf..1ff2118 100644 --- a/frontend.Dockerfile +++ b/production.frontend.Dockerfile @@ -4,7 +4,6 @@ FROM debian:latest # Install packages ENV DEBIAN_FRONTEND=noninteractive -#RUN apt update && apt install -y python3-pip python3-venv && rm -rf /var/lib/apt/lists/* RUN apt update && apt install -y curl && \ curl -fsSL https://deb.nodesource.com/setup_19.x | bash - && apt-get install -y nodejs && \ apt install -y debian-keyring debian-archive-keyring apt-transport-https && \ @@ -27,6 +26,7 @@ WORKDIR /app COPY --chown=${CUSTOM_USERNAME}:${CUSTOM_GROUPNAME} package.json package-lock.json .postcssrc postcss.config.js tailwind.config.js Caddyfile /app/ COPY --chown=${CUSTOM_USERNAME}:${CUSTOM_GROUPNAME} frontend /app/frontend/ COPY --chown=${CUSTOM_USERNAME}:${CUSTOM_GROUPNAME} public /app/public/ +COPY --chown=${CUSTOM_USERNAME}:${CUSTOM_GROUPNAME} robots /app/robots/ # Install dependencies USER ${CUSTOM_UID:-1000}:${CUSTOM_GID:-1000}