Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Added Doppler to Docker API Image #361

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Loading