Migrate Passit to docker_service & set correct volume folder path

This commit is contained in:
Jesper Hess 2021-01-27 13:46:06 +01:00
parent 406e19a95c
commit a692e7d2cb
Signed by untrusted user: graffen
GPG key ID: 351A89E40D763F0F
2 changed files with 41 additions and 39 deletions

View file

@ -19,6 +19,7 @@ gitea:
passit: passit:
domain: "passit.{{ base_domain }}" domain: "passit.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/passit"
fider: fider:
domain: "feedback.{{ base_domain }}" domain: "feedback.{{ base_domain }}"

View file

@ -1,45 +1,46 @@
--- ---
- name: passit network - docker_service:
docker_network: project_name: "passit"
name: passit pull: "yes"
definition:
version: "3.6"
services:
- name: passit database volume passit_db:
docker_volume: image: "postgres:10"
name: passit_db restart: "always"
networks:
- "passit"
volumes:
- "{{ passit.volume_folder }}/data:/var/lib/postgresql/data"
environment:
POSTGRES_USER: "passit"
POSTGRES_PASSWORD: "{{ postgres_passwords.passit }}"
- name: passit database container passit_app:
docker_container: image: "passit/passit:stable"
name: passit_db command: "bin/start.sh"
image: postgres:10 restart: "always"
state: started networks:
restart_policy: always - "passit"
networks: - "postfix"
- name: passit - "external_services"
volumes: environment:
- passit_db:/var/lib/postgresql/data DATABASE_URL: "postgres://passit:{{ postgres_passwords.passit }}@passit_db:5432/passit"
env: SECRET_KEY: "{{ passit_secret_key }}"
POSTGRES_USER: passit IS_DEBUG: 'False'
POSTGRES_PASSWORD: "{{ postgres_passwords.passit }}" EMAIL_URL: "smtp://noop@{{ smtp_host }}:{{ smtp_port }}"
DEFAULT_FROM_EMAIL: "noreply@{{ passit.domain }}"
EMAIL_CONFIRMATION_HOST: "https://{{ passit.domain }}"
- name: passit app container VIRTUAL_HOST: "{{ passit.domain }}"
docker_container: LETSENCRYPT_HOST: "{{ passit.domain }}"
name: passit LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
image: passit/passit:stable
command: bin/start.sh
restart_policy: always
networks:
- name: passit
- name: postfix
- name: external_services
env:
DATABASE_URL: "postgres://passit:{{ postgres_passwords.passit }}@passit_db:5432/passit"
SECRET_KEY: "{{ passit_secret_key }}"
IS_DEBUG: 'False'
EMAIL_URL: smtp://noop@{{ smtp_host }}:{{ smtp_port }}
DEFAULT_FROM_EMAIL: "noreply@{{ passit.domain }}"
EMAIL_CONFIRMATION_HOST: "https://{{ passit.domain }}"
VIRTUAL_HOST: "{{ passit.domain }}" networks:
LETSENCRYPT_HOST: "{{ passit.domain }}" passit:
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" postfix:
external: true
external_services:
external: true