Skip to content

Commit

Permalink
Properly pass env variables to container
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjstevens committed Mar 20, 2024
1 parent 7499f20 commit 4a2c026
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/deploy/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ services:
FILE_UPLOAD_FOLDER: /data/uploads
LOG_LEVELS: error,warn,log,debug
ALLOW_GUEST_USER: true
URL: ${URL}
JWT_SECRET: ${JWT_SECRET}
SESSION_SECRET: ${SESSION_SECRET}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
ports:
- 3999:3999
volumes:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ on:
inputs:
publish:
description: 'Build and publish Docker image'
required: false
type: boolean
required: false
default: false
deploy:
description: 'Deploy to demo server'
required: false
type: boolean
required: false
default: false

jobs:
build:
Expand Down Expand Up @@ -58,7 +60,9 @@ jobs:
build-and-push-docker:
name: Build and push Docker image
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' || inputs.publish }}
if:
${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') ||
inputs.publish }}
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down Expand Up @@ -87,7 +91,8 @@ jobs:
environment: staging
needs: build-and-push-docker
if:
${{ github.ref == 'refs/heads/main' || ( inputs.deploy && always()) }}
${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') ||
( inputs.deploy && always()) }}
steps:
- name: Check out
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-collaboration-server/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const nodeEnv = process.env.NODE_ENV ?? 'production'
const validationSchema = Joi.object({
// Required
URL: Joi.string().uri().required(),
MONGODB_URI: Joi.string().uri(),
MONGODB_URI: Joi.string(),
MONGODB_URI_FILE: Joi.string(),
FILE_UPLOAD_FOLDER: Joi.string().required(),
GOOGLE_CLIENT_ID: Joi.string(),
Expand Down

0 comments on commit 4a2c026

Please sign in to comment.