Compare commits
4 Commits
4f8568f1ba
...
a4b98e0ac4
Author | SHA1 | Date | |
---|---|---|---|
a4b98e0ac4 | |||
77088baa9b | |||
bffc222bb0 | |||
26eaea8c01 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,4 @@
|
||||
__pycache__/
|
||||
|
||||
# ansible vault password
|
||||
.vault_pass
|
||||
|
@ -13,25 +13,69 @@
|
||||
- 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
[defaults]
|
||||
inventory = hosts
|
||||
vault_password_file = .vault_pass
|
||||
|
||||
[connection]
|
||||
pipelining = True
|
||||
|
@ -117,5 +117,5 @@ backend listas_ansol
|
||||
# Saucy
|
||||
|
||||
backend saucy
|
||||
server saucy saucy:80 check
|
||||
server saucy 10.81.14.206:80 check
|
||||
|
||||
|
18
host_vars/saucy@lxd.ansol.org
Normal file
18
host_vars/saucy@lxd.ansol.org
Normal file
@ -0,0 +1,18 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
31636238333732343966666539656439613537623162353737636561366139313961303734356330
|
||||
3933323162373333333362323430373365633432633162340a653261653461653639316638656161
|
||||
63663531616632623263626265363263306532623563633565643863306166393664303833653936
|
||||
3163663766346633380a316131653532346539353262366432306561336436656464626530356237
|
||||
39303539353765383662316566353038373039623166373131323762626263343135323534656562
|
||||
37313665386439363965613131396564356130636663613537383965306134623861633161333238
|
||||
36633639313635313066313831666137613634623335636234663532623166343232313835386632
|
||||
63326565363932396566656537393032353935316663373262373766663265623230336565363562
|
||||
65663938646635396235623561353733356330383939653962646662313635313036356561623861
|
||||
61373962353464323966383937383466613063383461333338326666363432303161626131643234
|
||||
63353730313939623633663533333563323761653534666661613562396430616266346466646336
|
||||
35393162386463303831636135303132663235313134386531626234356430326563636366333464
|
||||
35613635626563363439333764663935313231663563323931656333313634646336613062636235
|
||||
66633761316335613830346265356333656239373661666539636239396130616666623733303138
|
||||
39343436303837316266333962396461333438383666616636396637643864643265643435656539
|
||||
34323635633565333662313430343362396638373234613036653838616339346433363435326365
|
||||
6366
|
Loading…
Reference in New Issue
Block a user