adiciona containers e tweaks
This commit is contained in:
parent
bffc222bb0
commit
77088baa9b
@ -13,25 +13,69 @@
|
|||||||
- curl
|
- curl
|
||||||
- gnupg
|
- gnupg
|
||||||
- lsb-release
|
- lsb-release
|
||||||
|
- python3-psycopg2
|
||||||
- name: SAUCY -- add Docker GPG key
|
- name: SAUCY -- add Docker GPG key
|
||||||
|
become: true
|
||||||
apt_key:
|
apt_key:
|
||||||
url: https://download.docker.com/linux/ubuntu/gpg
|
url: https://download.docker.com/linux/ubuntu/gpg
|
||||||
state: present
|
state: present
|
||||||
- name: SAUCY -- add Docker repository to apt
|
- name: SAUCY -- add Docker repository to apt
|
||||||
|
become: true
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: deb https://download.docker.com/linux/ubuntu focal stable
|
repo: deb https://download.docker.com/linux/ubuntu focal stable
|
||||||
state: present
|
state: present
|
||||||
- name: SAUCY -- install docker
|
- name: SAUCY -- install docker
|
||||||
|
become: true
|
||||||
apt:
|
apt:
|
||||||
name: '{{item}}'
|
name: '{{item}}'
|
||||||
state: latest
|
state: latest
|
||||||
update_cache: yes
|
|
||||||
loop:
|
loop:
|
||||||
- docker-ce
|
- docker-ce
|
||||||
- docker-ce-cli
|
- docker-ce-cli
|
||||||
- containerd.io
|
- containerd.io
|
||||||
|
- python3-docker
|
||||||
- name: SAUCY -- start, and enable, docker service
|
- name: SAUCY -- start, and enable, docker service
|
||||||
|
become: true
|
||||||
service:
|
service:
|
||||||
name: docker
|
name: docker
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user