Compare commits

..

No commits in common. "a4b98e0ac43b47de6f322a885371c49a8b36c5ca" and "4f8568f1ba1f77a0c3ccfa1834915f5a9ebca5c2" have entirely different histories.

5 changed files with 2 additions and 68 deletions

3
.gitignore vendored
View File

@ -1,4 +1 @@
__pycache__/
# ansible vault password
.vault_pass

View File

@ -13,69 +13,25 @@
- curl
- gnupg
- lsb-release
- python3-psycopg2
- name: SAUCY -- add Docker GPG key
become: true
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
- name: SAUCY -- add Docker repository to apt
become: true
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu focal stable
state: present
- name: SAUCY -- install docker
become: true
apt:
name: '{{item}}'
state: latest
update_cache: yes
loop:
- docker-ce
- docker-ce-cli
- containerd.io
- python3-docker
- name: SAUCY -- start, and enable, docker service
become: true
service:
name: docker
state: started
enabled: yes
# postgres server and db, account
- name: SAUCY -- install postgresql
become: true
community.docker.docker_container:
name: postgresql
image: postgres:latest
state: started
container_default_behavior: no_defaults
volumes:
- /data:/var/lib/postgresql/data
ports:
- '5432:5432'
env:
POSTGRES_USER: '{{ db_user }}'
POSTGRES_PASSWORD: '{{ db_password }}'
POSTGRES_DB: '{{ db_name }}'
- name: SAUCY -- add Saucy container
community.docker.docker_container:
name: saucy
image: git.ansol.org/ansol/saucy:latest
state: started
container_default_behavior: no_defaults
ports:
- '80:3000'
env:
DATABASE_URL: 'postgres://{{ db_user }}:{{ db_password }}@{{ db_host }}/{{ db_name }}'
SMTP_ADDRESS: smtp.netureza.pt
SMTP_DOMAIN: ansol.org
SMTP_USERNAME: '{{ smtp_username }}'
SMTP_PASSWORD: '{{ smtp_password }}'
SMTP_FROM_ADDRESS: direccao@ansol.org
SMTP_FROM_NAME: ANSOL
IFTHENPAY_KEY: '{{ ifthenpay_key }}'
IFTHENPAY_ACCOUNTS: '{{ ifthenpay_accounts }}'
BASE_HOST: saucy.ansol.org
RAILS_LOG_TO_STDOUT: 'true'
RAILS_ENV: production

View File

@ -1,6 +1,5 @@
[defaults]
inventory = hosts
vault_password_file = .vault_pass
[connection]
pipelining = True

View File

@ -117,5 +117,5 @@ backend listas_ansol
# Saucy
backend saucy
server saucy 10.81.14.206:80 check
server saucy saucy:80 check

View File

@ -1,18 +0,0 @@
$ANSIBLE_VAULT;1.1;AES256
31636238333732343966666539656439613537623162353737636561366139313961303734356330
3933323162373333333362323430373365633432633162340a653261653461653639316638656161
63663531616632623263626265363263306532623563633565643863306166393664303833653936
3163663766346633380a316131653532346539353262366432306561336436656464626530356237
39303539353765383662316566353038373039623166373131323762626263343135323534656562
37313665386439363965613131396564356130636663613537383965306134623861633161333238
36633639313635313066313831666137613634623335636234663532623166343232313835386632
63326565363932396566656537393032353935316663373262373766663265623230336565363562
65663938646635396235623561353733356330383939653962646662313635313036356561623861
61373962353464323966383937383466613063383461333338326666363432303161626131643234
63353730313939623633663533333563323761653534666661613562396430616266346466646336
35393162386463303831636135303132663235313134386531626234356430326563636366333464
35613635626563363439333764663935313231663563323931656333313634646336613062636235
66633761316335613830346265356333656239373661666539636239396130616666623733303138
39343436303837316266333962396461333438383666616636396637643864643265643435656539
34323635633565333662313430343362396638373234613036653838616339346433363435326365
6366