mirror of
https://github.com/Crocmagnon/ansible.git
synced 2024-11-24 00:08:02 +01:00
This commit is contained in:
parent
7e6d0e1c49
commit
556fa6613c
5 changed files with 43 additions and 0 deletions
|
@ -16,5 +16,6 @@
|
|||
- import_playbook: miniflux.yaml # noqa: name[play]
|
||||
- import_playbook: portainer.yaml # noqa: name[play]
|
||||
- import_playbook: privatebin.yaml # noqa: name[play]
|
||||
- import_playbook: shortener.yaml # noqa: name[play]
|
||||
- import_playbook: test_headers.yaml # noqa: name[play]
|
||||
- import_playbook: wallabag.yaml # noqa: name[play]
|
||||
|
|
10
playbooks/apps/files/shortener/docker-compose.yaml
Normal file
10
playbooks/apps/files/shortener/docker-compose.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
services:
|
||||
django:
|
||||
image: rg.fr-par.scw.cloud/crocmagnon/shortener
|
||||
env_file: shortener.env
|
||||
restart: always
|
||||
volumes:
|
||||
- ./shortener_data:/db
|
||||
mem_limit: 300m
|
||||
ports:
|
||||
- "8011:8000"
|
7
playbooks/apps/files/shortener/update
Executable file
7
playbooks/apps/files/shortener/update
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
pushd /mnt/data/shortener
|
||||
docker compose --ansi never pull
|
||||
docker compose --ansi never up -d
|
||||
popd
|
||||
docker image prune -f
|
20
playbooks/apps/shortener.yaml
Normal file
20
playbooks/apps/shortener.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
- name: Shortener
|
||||
hosts: servers
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Docker
|
||||
ansible.builtin.include_role:
|
||||
name: docker
|
||||
|
||||
vars:
|
||||
docker_app_name: shortener
|
||||
secret_key: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
37353266666433343332313765343531623930613733393865363131616666653532343130316163
|
||||
3965326235653239373561373361643239326665636166610a303461626433306636653638313435
|
||||
61393338643738363765323630623765323238373964306532346664656666623663306330373838
|
||||
3633366163636265660a366465656539383539383665323639623430656265346234303136303937
|
||||
64376439386232663733363539616232656266626465316364323331386633346530373165376231
|
||||
65363935643965356237396235666337343739653164366263386537366338373036393734343565
|
||||
653032643966636463316633616137646235
|
5
playbooks/apps/templates/shortener/shortener.env.j2
Normal file
5
playbooks/apps/templates/shortener/shortener.env.j2
Normal file
|
@ -0,0 +1,5 @@
|
|||
DEBUG=false
|
||||
SECRET_KEY={{ secret_key }}
|
||||
DATABASE_URL=sqlite:////db/db.sqlite3
|
||||
ALLOWED_HOSTS=localhost,g4b.ovh
|
||||
CSRF_TRUSTED_ORIGINS=https://g4b.ovh
|
Loading…
Reference in a new issue