Add postfix container. Get passit running with that. Fider is still not working.

This commit is contained in:
Víðir Valberg Guðmundsson 2019-02-10 08:59:53 +01:00
parent 0675539530
commit fefbabcc33
5 changed files with 31 additions and 6 deletions

View file

@ -15,6 +15,10 @@
- fider
- passit
- gitea
- postfix
smtp_host: postfix
smtp_port: 587
tasks:
- import_role:

View file

@ -3,6 +3,14 @@
docker_network:
name: external_services
- name: setup network for postfix
docker_network:
name: postfix
ipam_options:
subnet: '172.16.0.0/16'
gateway: 172.16.0.1
- name: setup services
include_tasks: "services/{{ item }}.yml"
with_items: "{{ services }}"

View file

@ -19,17 +19,18 @@
volumes:
- fider_db:/var/lib/postgresql/data
env:
POSTGRES_DB: somethingelse
POSTGRES_USER: fider
POSTGRES_PASSWORD: "{{ postgres_passwords.fider }}"
- name: fider app container
docker_container:
name: fider
image: getfider/fider:stable
restart_policy: always
networks:
- name: fider
- name: external_services
- name: postfix
env:
GO_ENV: production
DATABASE_URL: postgres://fider:{{ postgres_passwords.fider }}@fider_db:5432/fider?sslmode=disable
@ -38,8 +39,8 @@
EMAIL_NOREPLY: noreply@{{ fider.domain }}
EMAIL_SMTP_HOST: "{{ smtp_host }}"
EMAIL_SMTP_PORT: "{{ smtp_port }}"
EMAIL_SMTP_USERNAME: "{{ smtp_username }}"
EMAIL_SMTP_PASSWORD: "{{ smtp_password }}"
EMAIL_SMTP_USERNAME: "noop"
EMAIL_SMTP_PASSWORD: "noop"
VIRTUAL_HOST: "{{ fider.domain }}"
LETSENCRYPT_HOST: "{{ fider.domain }}"

View file

@ -19,23 +19,24 @@
volumes:
- passit_db:/var/lib/postgresql/data
env:
POSTGRES_DB: somethingelse
POSTGRES_USER: passit
POSTGRES_PASSWORD: "{{ postgres_passwords.passit }}"
- name: passit app container
docker_container:
name: passit
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 }}@db:5432/passit"
DATABASE_URL: "postgres://passit:{{ postgres_passwords.passit }}@passit_db:5432/passit"
SECRET_KEY: "{{ passit_secret_key }}"
IS_DEBUG: 'False'
EMAIL_URL: smtp://{{ smtp_user }}:{{ smtp_password }}@{{ smtp_host }}:{{ smtp_port}}
EMAIL_URL: smtp://noop@{{ smtp_host }}:{{ smtp_port }}
DEFAULT_FROM_EMAIL: "noreply@{{ passit.domain }}"
EMAIL_CONFIRMATION_HOST: "https://{{ passit.domain }}"

View file

@ -0,0 +1,11 @@
---
- name: setup postfix docker container for outgoing mail
docker_container:
name: postfix
image: boky/postfix
networks:
- name: postfix
env:
ALLOWED_SENDER_DOMAINS: "{{ base_domain }}"