Fix: Add build dependencies for psycopg2-binary, update CORS to IP address

This commit is contained in:
Christian 2025-12-17 17:21:03 +01:00
parent 34e1faf91d
commit 87c729a4c6
6 changed files with 9 additions and 9 deletions

View File

@ -49,8 +49,8 @@ API_RELOAD=false
# Brug: python -c "import secrets; print(secrets.token_urlsafe(32))"
SECRET_KEY=CHANGEME_GENERATE_RANDOM_SECRET_KEY
# CORS origins - tilføj din domain
CORS_ORIGINS=https://hub.bmcnetworks.dk,https://api.bmcnetworks.dk
# CORS origins - IP adresse med port
CORS_ORIGINS=http://172.16.31.183:8001
# =====================================================
# LOGGING - Production

View File

@ -8,6 +8,8 @@ RUN apt-get update && apt-get install -y \
git \
libpq-dev \
gcc \
g++ \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Build arguments for GitHub release deployment

View File

@ -48,9 +48,7 @@ curl -H "Authorization: token YOUR_GITEA_TOKEN" \
https://g.bmcnetworks.dk/api/v1/repos/ct/bmc_hub/raw/docker-compose.prod.yml?ref=v1.0.0 \
-o docker-compose.yml
curl -H "Authorization: token YOUR_GITEA_TOKEN" \
https://g.bmcnetworks.dk/api/v1/repos/ct/bmc_hub/raw/Dockerfile?ref=v1.0.0 \
-o Dockerfile
mkdir -p /srv/podman/bmc_hub_v1.0 && cd /srv/podman/bmc_hub_v1.0 && curl -H "Authorization: token 58419ee1f9503a95b58e56448db6f77a6caddff6" https://g.bmcnetworks.dk/api/v1/repos/ct/bmc_hub/raw/scripts/deploy_production.sh?ref=v1.0.1 -o setup.sh && chmod +x setup.sh
curl -H "Authorization: token YOUR_GITEA_TOKEN" \
https://g.bmcnetworks.dk/api/v1/repos/ct/bmc_hub/raw/.env.prod.example?ref=v1.0.0 \
@ -98,7 +96,7 @@ SECRET_KEY=$(python3 -c "import secrets; print(secrets.token_urlsafe(32))")
# Production settings
LOG_LEVEL=WARNING
CORS_ORIGINS=https://yourdomain.com
CORS_ORIGINS=http://172.16.31.183:8001
# BEHOLD SAFETY SWITCHES PÅ!
ECONOMIC_READ_ONLY=true

View File

@ -51,7 +51,7 @@ SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# API
API_PORT=8000
CORS_ORIGINS=https://yourdomain.com
CORS_ORIGINS=http://172.16.31.183:8001
# Safety (BEHOLD true!)
ECONOMIC_READ_ONLY=true

View File

@ -43,7 +43,7 @@ SECRET_KEY=GENERATE_RANDOM_SECRET_KEY_HERE
API_HOST=0.0.0.0
API_PORT=8000
API_RELOAD=false
CORS_ORIGINS=https://yourdomain.com
CORS_ORIGINS=http://172.16.31.183:8001
LOG_LEVEL=WARNING
LOG_FILE=logs/app.log

View File

@ -102,7 +102,7 @@ DATABASE_URL=postgresql://bmc_hub_prod:SKIFT_DENNE_PASSWORD@postgres:5432/bmc_hu
SECRET_KEY=$(python3 -c "import secrets; print(secrets.token_urlsafe(32))")
API_PORT=8000
CORS_ORIGINS=https://yourdomain.com
CORS_ORIGINS=http://172.16.31.183:8001
ECONOMIC_READ_ONLY=true
ECONOMIC_DRY_RUN=true