forked from DadosAbertosDeFeira/iac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
71 lines (71 loc) · 2.76 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
- hosts: all
pre_tasks:
- name: Atualizando apt cache
apt:
update_cache: yes
cache_valid_time: 600
when: ansible_os_family == 'Debian'
roles:
- dokku_bot.ansible_dokku
- iac-role-basica
- iac-role-services
vars:
dokku_version: 0.22.3
sshcommand_version: 0.12.0
dokku_hostname: mariaquiteria.gomex.me
dokku_users:
- name: gomex
username: gomex
ssh_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYc9rlj0wKka5t31T4EiTanSmXpswDg00dYmuwdvEW3bAovcdzt6p3kgFxpPaZj7X6oFfvSCXpoL+/yjngujEW9CGbqfdVyvCodIuIaGuoUsxo7dtMCLzqZtGGe1m6xoTyNqZQzv68nF1fZ/ku7YNK9HGKKcjNJVvs6ocqK5Jbdb6IGRF64kP4hx8IX5n8CU8APn5esrh6BNhViKHWYIGDYoFkd54Z4CeD156BYl1OhWbla6u1vOntpj1uw3Lp+haAWbXSJMCpztsYPeynrQ14GUbHPRAsO4IILD5CtZWsp16VnEIAhsIqrnzp1BGTduwbX5VVzY3K7JdFNEWThFhd"
dokku_plugins:
- name: clone
url: https://github.com/crisward/dokku-clone.git
- name: letsencrypt
url: https://github.com/dokku/dokku-letsencrypt.git
tasks:
- name: create app
dokku_app:
# change this name in your template!
app: &appname mariaquiteria.gomex.me
- name: environment configuration
dokku_config:
app: *appname
config:
# specify a email for dokku-letsencrypt
DOKKU_LETSENCRYPT_EMAIL: [email protected]
# specify port so `domains` can setup the port mapping properly
PORT: "5000"
# DATABASE_URL: ""
# CLOUDAMQP_URL: ""
# CLOUDAMQP_APIKEY: ""
CITY_COUNCIL_WEBSERVICE: "https://www.transparencia.feiradesantana.ba.leg.br/"
DJANGO_ALLOWED_HOSTS: "0.0.0.0,mariaquiteria.gomex.me,.gomex.me"
DJANGO_CONFIGURATION: "Prod"
# DJANGO_SECRET_KEY: ""
DJANGO_SETTINGS_MODULE: "web.settings"
ENABLE_AUTOTHROTTLE_DEBUG: "True"
NEW_RELIC_LOG: "stdout"
SPIDERMON_TELEGRAM_FAKE: "True"
SPIDERMON_SENTRY_FAKE: "True"
- name: Add dokku_service network to mariaquiteria
command: dokku network:set mariaquiteria.gomex.me attach-post-create dokku_services
args:
creates: /tmp/network_dokku_services_mariaquiteria
changed_when: "'molecule-idempotence-notest' not in ansible_skip_tags"
- name: git clone
# note you'll need to add a deployment key to the GH repo if it's private!
dokku_clone:
app: *appname
repository: https://github.com/DadosAbertosDeFeira/maria-quiteria.git main
- name: add domain
dokku_domains:
app: *appname
domains:
- mariaquiteria.gomex.me
- name: Configurar o crawl diário
ansible.builtin.cron:
name: "Crawl diario"
minute: "0"
hour: "6"
job: "dokku run mariaquiteria.gomex.me python manage.py crawl"