fix: #18 Fix cors issue for production environment (#19)

This commit is contained in:
Vincent Pochet 2022-05-10 14:45:15 +02:00 committed by GitHub
parent 867d6896fa
commit d07887ad7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -134,6 +134,7 @@ jobs:
env: env:
RAILS_ENV: staging RAILS_ENV: staging
API_URL: https://${{ github.event.inputs.preview_name }}-api.staging.getlago.com API_URL: https://${{ github.event.inputs.preview_name }}-api.staging.getlago.com
LAGO_FRONT_URL: https://${{ github.event.inputs.preview_name }}-app.staging.getlago.com
with: with:
context: ./api context: ./api
push: true push: true

View File

@ -88,6 +88,7 @@ services:
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@db:5432/${POSTGRES_DB:-lago} - DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@db:5432/${POSTGRES_DB:-lago}
- REDIS_URL=redis://redis:6379 - REDIS_URL=redis://redis:6379
- SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64} - SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
- LAGO_FRONT_URL=${FRONT_URL:-https://app.lago.dev}
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.api_http.rule=Host(`api.lago.dev`)" - "traefik.http.routers.api_http.rule=Host(`api.lago.dev`)"

View File

@ -42,6 +42,7 @@ services:
- SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64} - SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
- RAILS_ENV=production - RAILS_ENV=production
- SENTRY_DSN=${SENTRY_DSN} - SENTRY_DSN=${SENTRY_DSN}
- LAGO_FRONT_URL"${FRONT_URL:-http://localhost}
ports: ports:
- ${API_PORT:-3000}:3000 - ${API_PORT:-3000}:3000