configure deployment

This commit is contained in:
Tobias Brunner 2025-01-30 16:47:10 +01:00
parent a913a6db8e
commit 4f8d292974
No known key found for this signature in database
3 changed files with 8 additions and 2 deletions

1
.gitignore vendored
View file

@ -13,3 +13,4 @@ wheels/
.env
*.sqlite3
media/
deployment/secret.yaml

View file

@ -31,7 +31,8 @@ deploy:
stage: deploy
image: $OC_IMAGE
script:
- echo "todo"
- oc -n ${NAMESPACE} apply --overwrite -f deployment/
- oc -n ${NAMESPACE} rollout restart deployment/servala
environment:
name: prod
url: https://poc.serva.la/

View file

@ -1,10 +1,14 @@
#!/bin/sh -e
# Create required directories with appropriate permissions
mkdir -p /run/caddy /run/gunicorn
chmod 777 /run /run/caddy /run/gunicorn
echo "Applying database migrations"
python -m hub migrate
echo "Starting Caddy"
caddy start --config /etc/caddy/Caddyfile
caddy start --config /etc/caddy/Caddyfile --pidfile /run/caddy/caddy.pid
echo "Starting Gunicorn"
exec \