diff --git a/.github/workflows/docker.export.frontend.selfhosted.yml b/.github/workflows/docker.export.frontend.selfhosted.yml index 3fbaf573f..db463deb5 100644 --- a/.github/workflows/docker.export.frontend.selfhosted.yml +++ b/.github/workflows/docker.export.frontend.selfhosted.yml @@ -4,9 +4,6 @@ on: push: branches: - main - pull_request: - branches: - - main jobs: build: diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index c072a1bbb..6db11f1b8 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -141,7 +141,6 @@ services: depends_on: api: condition: service_healthy - volumes: - .:/app networks: diff --git a/docker-compose.source.yml b/docker-compose.source.yml index 22a2e1f39..988e49967 100644 --- a/docker-compose.source.yml +++ b/docker-compose.source.yml @@ -30,6 +30,7 @@ services: context: ./ dockerfile: ./packages/api/Dockerfile environment: + DOPPLER_TOKEN: ${DOPPLER_TOKEN_API} DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DB}?ssl=false DISTRIBUTION: ${DISTRIBUTION} JWT_SECRET: ${JWT_SECRET} @@ -125,7 +126,7 @@ services: NEXT_PUBLIC_WEBAPP_DOMAIN: ${NEXT_PUBLIC_WEBAPP_DOMAIN} restart: unless-stopped ports: - - 80:3000 + - 80:8090 depends_on: - api networks: @@ -137,7 +138,7 @@ services: dockerfile: ./apps/magic-link/Dockerfile context: ./ args: - NEXT_PUBLIC_MAGIC_LINK_DOMAIN: ${NEXT_PUBLIC_MAGIC_LINK_DOMAIN} + VITE_BACKEND_DOMAIN: ${NEXT_PUBLIC_MAGIC_LINK_DOMAIN} restart: always ports: - 81:80 diff --git a/packages/api/Dockerfile b/packages/api/Dockerfile index b4a7a50f0..440ddada4 100644 --- a/packages/api/Dockerfile +++ b/packages/api/Dockerfile @@ -46,7 +46,19 @@ FROM base AS runner WORKDIR /app COPY --from=installer ./app . +WORKDIR /app/packages/api +# # # # # # # # # # # # # Launching the backend -# Maintain the root api folder as context (Breaking) -CMD cd /app/packages/api && node dist/src/main.js \ No newline at end of file +# # # # # # # # # # # # +# DEV: Maintain the /app/packages/api folder as context (Breaking) +# # # # # # # # # # # # +CMD node dist/src/main.js + +# # # # # # # # # # # # +# Production: Injects env vars via Doppler - DOPPLER_TOKEN variable must be set +# Install Doppler CLI +# RUN wget -q -t3 'https://packages.doppler.com/public/cli/rsa.8004D9FF50437357.key' -O /etc/apk/keys/cli@doppler-8004D9FF50437357.rsa.pub && \ +# echo 'https://packages.doppler.com/public/cli/alpine/any-version/main' | tee -a /etc/apk/repositories && \ +# apk add doppler +# CMD doppler run --command="node dist/src/main.js" \ No newline at end of file