Skip to content

Commit

Permalink
Merge pull request #361 from panoratech/fix-docker-port
Browse files Browse the repository at this point in the history
🔧 Added Doppler to Docker API Image
  • Loading branch information
rflihxyz authored Apr 15, 2024
2 parents 374f69e + d78ce57 commit f50d101
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/docker.export.frontend.selfhosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
Expand Down
1 change: 0 additions & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ services:
depends_on:
api:
condition: service_healthy

volumes:
- .:/app
networks:
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
16 changes: 14 additions & 2 deletions packages/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
# # # # # # # # # # # #
# 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/[email protected] && \
# 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"

0 comments on commit f50d101

Please sign in to comment.