fix: update environment variables in docker-compose for better configurability

This commit is contained in:
2025-12-04 20:28:19 +01:00
parent 962ae2d0d3
commit d052e464b2
2 changed files with 9 additions and 6 deletions

3
docker/.env.example Normal file
View File

@@ -0,0 +1,3 @@
BACKEND_URL=backend.example.com
FRONTEND_URL=example.com
SESSION_DOMAIN=.example.com

View File

@@ -6,8 +6,8 @@ services:
dockerfile: Dockerfile
restart: unless-stopped
environment:
NUXT_PUBLIC_SANCTUM_BASE_URL: https://backend.example.com
NUXT_PUBLIC_SANCTUM_ORIGINAL: https://example.com
NUXT_PUBLIC_SANCTUM_BASE_URL: ${BACKEND_URL:-https://backend.example.com}
NUXT_PUBLIC_SANCTUM_ORIGINAL: ${FRONTEND_URL:-https://example.com}
ports:
- 80:80
depends_on:
@@ -30,10 +30,10 @@ services:
APP_ENV: production
APP_KEY: SOME-KEY
APP_DEBUG: false
APP_URL: https://example.com
FRONTEND_URL: https://example.com
SANCTUM_STATEFUL_DOMAINS: backend.example.com,example.com
SESSION_DOMAIN: .example.com # Note the first dot
APP_URL: ${FRONTEND_URL:-https://example.com}
FRONTEND_URL: ${FRONTEND_URL:-https://example.com}
SANCTUM_STATEFUL_DOMAINS: ${BACKEND_URL:-https://backend.example.com},${FRONTEND_URL:-https://example.com}
SESSION_DOMAIN: ${SESSION_DOMAIN:-.example.com} # Note the first dot
APP_LOCALE: sk
APP_FALLBACK_LOCALE: en_US