configure deployment
This commit is contained in:
parent
a913a6db8e
commit
4f8d292974
3 changed files with 8 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -13,3 +13,4 @@ wheels/
|
||||||
.env
|
.env
|
||||||
*.sqlite3
|
*.sqlite3
|
||||||
media/
|
media/
|
||||||
|
deployment/secret.yaml
|
|
@ -31,7 +31,8 @@ deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: $OC_IMAGE
|
image: $OC_IMAGE
|
||||||
script:
|
script:
|
||||||
- echo "todo"
|
- oc -n ${NAMESPACE} apply --overwrite -f deployment/
|
||||||
|
- oc -n ${NAMESPACE} rollout restart deployment/servala
|
||||||
environment:
|
environment:
|
||||||
name: prod
|
name: prod
|
||||||
url: https://poc.serva.la/
|
url: https://poc.serva.la/
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
#!/bin/sh -e
|
#!/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"
|
echo "Applying database migrations"
|
||||||
python -m hub migrate
|
python -m hub migrate
|
||||||
|
|
||||||
echo "Starting Caddy"
|
echo "Starting Caddy"
|
||||||
caddy start --config /etc/caddy/Caddyfile
|
caddy start --config /etc/caddy/Caddyfile --pidfile /run/caddy/caddy.pid
|
||||||
|
|
||||||
echo "Starting Gunicorn"
|
echo "Starting Gunicorn"
|
||||||
exec \
|
exec \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue