You've already forked hotpocket
BTHLABS-63: Production deployment workflow
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
export PIP_INDEX_URL="https://nexus.bthlabs.pl/repository/pypi/simple/"
|
||||
/srv/venv/bin/pip install -r /srv/lib/backend/requirements.txt
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
(
|
||||
cd /srv/app;
|
||||
./manage.py collectstatic --no-input
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
hotpocket-bthlabs>=25.10.28
|
||||
60
deployment/hotpocket_app/env_vars/production/vars.yaml
Normal file
60
deployment/hotpocket_app/env_vars/production/vars.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
hotpocket_app:
|
||||
deployment_directory: "/srv/hotpocket"
|
||||
owner: "hotpocket"
|
||||
group: "hotpocket"
|
||||
mode: "fullstack"
|
||||
loki:
|
||||
url: "http://monitoring.vm.snakeweb.net.bthlabs.net:3100/loki/api/v1/push"
|
||||
node: "home.vm.snakeweb.net"
|
||||
docker:
|
||||
extra_hosts:
|
||||
- "home.vm:10.0.1.2"
|
||||
backend:
|
||||
image_tag: "{{ hotpocket_app_image_tag|default('deployment-v25.10.21-01') }}"
|
||||
database:
|
||||
name: "thisissecret"
|
||||
user: "thisissecret"
|
||||
host: "thisissecret"
|
||||
rabbitmq:
|
||||
vhost: "thisissecret"
|
||||
user: "thisissecret"
|
||||
host: "thisissecret"
|
||||
model_auth_is_disabled: true
|
||||
env: "production"
|
||||
extra_env:
|
||||
- "HOTPOCKET_BACKEND_SECRETS_PACKAGE=hotpocket_bthlabs.secrets"
|
||||
- "VAULT_URL={{ hotpocket_app_secrets.backend.vault.url }}"
|
||||
- "VAULT_ROLE_ID={{ hotpocket_app_secrets.backend.vault.role_id }}"
|
||||
- "VAULT_SECRET_ID={{ hotpocket_app_secrets.backend.vault.secret_id }}"
|
||||
oidc:
|
||||
enabled: true
|
||||
endpoint: "thisissecret"
|
||||
display_name: "thisissecret"
|
||||
webapp:
|
||||
settings_module: "hotpocket_bthlabs.settings.webapp"
|
||||
loki:
|
||||
external_labels: "job=hotpocket,service=backend-webapp,environment=production"
|
||||
allowed_hosts:
|
||||
- "my.hotpocket.app"
|
||||
admin:
|
||||
settings_module: "hotpocket_bthlabs.settings.admin"
|
||||
loki:
|
||||
external_labels: "job=hotpocket,service=backend-admin,environment=production"
|
||||
allowed_hosts:
|
||||
- "admin.hotpocket.app"
|
||||
celery_worker:
|
||||
concurrency: 2
|
||||
loki:
|
||||
external_labels: "job=hotpocket,service=backend-celery-worker,environment=production"
|
||||
celery_beat:
|
||||
loki:
|
||||
external_labels: "job=hotpocket,service=backend-celery-beat,environment=production"
|
||||
customization:
|
||||
- src: "{{ inventory_dir }}/env_vars/production/etc/backend/entrypoint.d/01-install-customized-deps.sh"
|
||||
dest: "etc/backend/entrypoint.d/01-install-customized-deps.sh"
|
||||
mode: "755"
|
||||
- src: "{{ inventory_dir }}/env_vars/production/etc/backend/entrypoint.d/99-collectstatic.sh"
|
||||
dest: "etc/backend/entrypoint.d/99-collectstatic.sh"
|
||||
mode: "755"
|
||||
- src: "{{ inventory_dir }}/env_vars/production/lib/backend/requirements.txt"
|
||||
dest: "lib/backend/requirements.txt"
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
export PIP_INDEX_URL="https://nexus.bthlabs.pl/repository/pypi/simple/"
|
||||
/srv/venv/bin/pip install -r /srv/lib/backend/requirements.txt
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
(
|
||||
cd /srv/app;
|
||||
./manage.py collectstatic --no-input
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
hotpocket-bthlabs>=25.10.28
|
||||
37
deployment/hotpocket_app/env_vars/staging/vars.yaml
Normal file
37
deployment/hotpocket_app/env_vars/staging/vars.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
hotpocket_app:
|
||||
deployment_directory: "/srv/hotpocket_staging"
|
||||
owner: "hotpocket_staging"
|
||||
group: "hotpocket_staging"
|
||||
mode: "aio"
|
||||
loki:
|
||||
url: "http://monitoring.vm.snakeweb.net.bthlabs.net:3100/loki/api/v1/push"
|
||||
node: "home.vm.snakeweb.net"
|
||||
docker:
|
||||
extra_hosts:
|
||||
- "home.vm:10.0.1.2"
|
||||
backend:
|
||||
image_tag: "{{ hotpocket_app_image_tag|default('aio-v25.10.29-rc1-01') }}"
|
||||
model_auth_is_disabled: false
|
||||
env: "staging"
|
||||
extra_env:
|
||||
- "HOTPOCKET_BACKEND_SECRETS_PACKAGE=hotpocket_bthlabs.secrets"
|
||||
- "VAULT_URL={{ hotpocket_app_secrets.backend.vault.url }}"
|
||||
- "VAULT_ROLE_ID={{ hotpocket_app_secrets.backend.vault.role_id }}"
|
||||
- "VAULT_SECRET_ID={{ hotpocket_app_secrets.backend.vault.secret_id }}"
|
||||
oidc:
|
||||
enabled: false
|
||||
webapp:
|
||||
settings_module: "hotpocket_bthlabs.settings.webapp"
|
||||
loki:
|
||||
external_labels: "job=hotpocket,service=backend-webapp,environment=staging"
|
||||
allowed_hosts:
|
||||
- "staging.hotpocket.app"
|
||||
customization:
|
||||
- src: "{{ inventory_dir }}/env_vars/staging/etc/backend/entrypoint.d/01-install-customized-deps.sh"
|
||||
dest: "etc/backend/entrypoint.d/01-install-customized-deps.sh"
|
||||
mode: "755"
|
||||
- src: "{{ inventory_dir }}/env_vars/staging/etc/backend/entrypoint.d/99-collectstatic.sh"
|
||||
dest: "etc/backend/entrypoint.d/99-collectstatic.sh"
|
||||
mode: "755"
|
||||
- src: "{{ inventory_dir }}/env_vars/staging/lib/backend/requirements.txt"
|
||||
dest: "lib/backend/requirements.txt"
|
||||
Reference in New Issue
Block a user