Skip to content

Commit

Permalink
ar(feat) [DPTM-8] Dockerize and GCP
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloreale committed Aug 24, 2024
1 parent df420f5 commit 0b31635
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/deploy_gcp_prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
INSTAGRAM_CLIENT_SECRET=${{ secrets.INSTAGRAM_CLIENT_SECRET_PROD }}
KV_REST_API_READ_ONLY_TOKEN=${{ secrets.KV_REST_API_READ_ONLY_TOKEN_PROD }}
KV_REST_API_TOKEN=${{ secrets.KV_REST_API_TOKEN_PROD }}
KV_REST_API_URL=${{ secrets.KV_REST_API_URL }}
KV_URL=${{ secrets.KV_URL_PROD }}
MAIN_URL=${{ secrets.MAIN_URL_PROD }}
MONGODB_DATABASE=${{ secrets.MONGODB_DATABASE_PROD }}
Expand All @@ -86,7 +87,7 @@ jobs:
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ RUN \
else echo "Lockfile not found." && exit 1; \
fi

RUN npm i -g pm2

# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
Expand Down
35 changes: 35 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,38 @@ services:
image: ghcr.io/dreampipcom/hypnos:latest
ports:
- 3001:3001
hypnos_local:
container_name: hypnos_local
build:
args:
- API_URL=${API_URL}
- APPLE_CLIENT_ID=${APPLE_CLIENT_ID}
- APPLE_CLIENT_SECRET=${APPLE_CLIENT_SECRET}
- AUTH_SECRET=${AUTH_SECRET}
- AUTH_TRUST_HOST=${AUTH_TRUST_HOST}
- AUTH_URL=${AUTH_URL}
- EMAIL_FROM=${EMAIL_FROM}
- EMAIL_SERVER=${EMAIL_SERVER}
- FACEBOOK_CLIENT_ID=${FACEBOOK_CLIENT_ID}
- FACEBOOK_CLIENT_SECRET=${FACEBOOK_CLIENT_SECRET}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- INSTAGRAM_CLIENT_ID=${INSTAGRAM_CLIENT_ID}
- INSTAGRAM_CLIENT_SECRET=${INSTAGRAM_CLIENT_SECRET}
- KV_REST_API_READ_ONLY_TOKEN=${KV_REST_API_READ_ONLY_TOKEN}
- KV_REST_API_TOKEN=${KV_REST_API_TOKEN}
- KV_URL=${KV_URL}
- MAIN_URL=${MAIN_URL}
- MONGODB_DATABASE=${MONGODB_DATABASE}
- MONGODB_DEFAULT_ORG=${MONGODB_DEFAULT_ORG}
- MONGODB_ORGS_DATABASE=${MONGODB_ORGS_DATABASE}
- MONGODB_PRIVATE_URI=${MONGODB_PRIVATE_URI}
- MONGODB_PUBLIC_URI=${MONGODB_PUBLIC_URI}
- MONGODB_USERS_DATABASE=${MONGODB_USERS_DATABASE}
- NEXUS_KEEPALIVE=${NEXUS_KEEPALIVE}
- NEXUS_MODE=${NEXUS_MODE}
- NEXUS_STANDALONE=${NEXUS_STANDALONE}
- PRISMA_PRIVATE_URI=${MONGODB_PRIVATE_URI}
- PRISMA_PUBLIC_URI=${MONGODB_PUBLIC_URI}
ports:
- 3001:3001

0 comments on commit 0b31635

Please sign in to comment.