ansible/roles/docker/tasks/services/rallly.yml

61 lines
1.6 KiB
YAML
Raw Normal View History

2022-11-07 18:05:49 +00:00
- name: Create rallly volume folders
2022-11-07 17:38:08 +00:00
file:
name: "{{ rallly.volume_folder }}/postgres"
state: directory
2022-11-07 18:05:49 +00:00
- name: Copy Rallly environment file
template:
src: files/configs/rallly/env_file
dest: "{{ rallly.volume_folder }}/env_file"
2022-11-07 18:08:54 +00:00
- name: Set up Rallly
2022-11-07 17:38:08 +00:00
docker_compose:
project_name: "rallly"
pull: "yes"
definition:
version: "3.8"
services:
postgres:
image: "postgres:14-alpine"
restart: "unless-stopped"
shm_size: "256mb"
networks:
rallly_internal:
volumes:
- "{{ rallly.volume_folder }}/postgres:/var/lib/postgresql/data"
environment:
POSTGRES_PASSWORD: "{{ postgres_passwords.rallly }}"
POSTGRES_DB: "rallly_db"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
labels:
com.centurylinklabs.watchtower.enable: "true"
rallly:
image: "lukevella/rallly:latest"
restart: "unless-stopped"
networks:
rallly_internal:
external_services:
2022-11-07 18:05:49 +00:00
postfix:
2022-11-07 17:38:08 +00:00
ports:
- "3000:3000"
depends_on:
rallly_db:
condition: "service_healthy"
2022-11-07 18:05:49 +00:00
env_file:
- "{{ rallly.volume_folder }}/env_file"
2022-11-07 17:38:08 +00:00
labels:
com.centurylinklabs.watchtower.enable: "true"
networks:
rallly_internal:
internal: true
external_services:
external: true
2022-11-07 18:05:49 +00:00
postfix:
external: true