Make the wedding service work
This commit is contained in:
parent
e097eb9c93
commit
9cb8f7eb2e
2 changed files with 17 additions and 32 deletions
|
|
@ -12,15 +12,12 @@
|
|||
community.docker.docker_container:
|
||||
name: pi-hole
|
||||
image: "docker.io/pihole/pihole:{{ pi_hole_version }}"
|
||||
ports:
|
||||
- "53:53/tcp"
|
||||
- "53:53/udp"
|
||||
- "127.0.0.1:8080:80/tcp"
|
||||
mounts:
|
||||
- source: pihole_data
|
||||
target: /etc/pihole
|
||||
- source: dnsmasq_data
|
||||
target: /etc/dnsmasq.d
|
||||
network_mode: host
|
||||
restart_policy: always
|
||||
env:
|
||||
TZ: 'Europe/Amsterdam'
|
||||
|
|
@ -30,6 +27,7 @@
|
|||
PIHOLE_DNS_: 1.1.1.1;1.0.0.1
|
||||
DNSMASQ_USER: root
|
||||
DNSMASQ_LISTENING: all
|
||||
WEB_PORT: '8080'
|
||||
- name: Include simple-reverse-proxy role
|
||||
ansible.builtin.include_role:
|
||||
name: simple-reverse-proxy
|
||||
|
|
|
|||
|
|
@ -1,38 +1,25 @@
|
|||
---
|
||||
- name: Include user role
|
||||
ansible.builtin.include_role:
|
||||
name: user
|
||||
vars:
|
||||
user_username: "{{ wedding_username }}"
|
||||
user_password: "{{ wedding_password }}"
|
||||
- name: Login to ghcr registry and create ${XDG_RUNTIME_DIR}/containers/auth.json
|
||||
- name: Log into private GitHub registry
|
||||
become: true
|
||||
become_user: "{{ wedding_username }}"
|
||||
containers.podman.podman_login:
|
||||
community.docker.docker_login:
|
||||
registry_url: ghcr.io
|
||||
username: "{{ github_registry_user }}"
|
||||
password: "{{ github_registry_token }}"
|
||||
registry: ghcr.io
|
||||
changed_when: false
|
||||
- name: Create the wedding container
|
||||
ansible.builtin.include_role:
|
||||
name: podman-container
|
||||
apply:
|
||||
become: true
|
||||
become_user: "{{ wedding_username }}"
|
||||
vars:
|
||||
podman_container_name: wedding-server
|
||||
podman_container_image: ghcr.io/kleinendorst/wedding
|
||||
podman_container_tag: "{{ wedding_version }}"
|
||||
podman_container_publish:
|
||||
- 127.0.0.1:3001:3000
|
||||
podman_simple_container_volumes: []
|
||||
podman_container_env:
|
||||
- name: Install the container
|
||||
become: true
|
||||
community.docker.docker_container:
|
||||
name: wedding-server
|
||||
image: "ghcr.io/kleinendorst/wedding:{{ wedding_version }}"
|
||||
ports:
|
||||
- "127.0.0.1:3001:3000/tcp"
|
||||
env:
|
||||
DATABASE_HOST: 'postgres.kleinendorst.info'
|
||||
DATABASE_PORT: 5432
|
||||
DATABASE_DBNAME: wedding
|
||||
DATABASE_PORT: '5432'
|
||||
DATABASE_DBNAME: 'wedding'
|
||||
DATABASE_USER: "{{ postgres.user }}"
|
||||
DATABASE_PASSWORD: "{{ postgres.password }}"
|
||||
SESSION_SECRET: "{{ wedding_env.secret }}"
|
||||
NODE_ENV: production
|
||||
NODE_ENV: 'production'
|
||||
WEDDING_FULL_ACCESS_CODE: "{{ wedding_env.full_access_code }}"
|
||||
WEDDING_NIGHT_ACCESS_CODE: "{{ wedding_env.night_access_code }}"
|
||||
restart_policy: always
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue