ansible-role-outline-wiki/templates/docker-compose.yml.j2

82 lines
2.2 KiB
Plaintext
Raw Permalink Normal View History

2022-10-05 12:53:35 +02:00
version: "3.3"
services:
redis:
image: docker.io/library/redis:alpine
command: --save 60 1 --loglevel warning
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
start_period: 20s
interval: 30s
retries: 5
timeout: 3s
networks:
- outline
volumes:
- {{ outline_volume_redis | expanduser | realpath }}:/data
2022-10-05 12:53:35 +02:00
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
2022-12-07 11:04:33 +01:00
{% if outline_db_schema == 'postgres' and outline_db_host == 'postgres' %}
2022-10-05 12:53:35 +02:00
postgres:
image: docker.io/library/postgres:12-alpine
env_file:
- "{{ outline_setup_path | expanduser | realpath }}/env.db.conf"
2022-10-05 12:53:35 +02:00
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
networks:
- outline
{% if outline_db_port %}
ports:
- {{ outline_db_port }}:5432
{% endif %}
volumes:
- {{ outline_volume_db }}:/var/lib/postgresql/data
2022-12-07 11:04:33 +01:00
{% else %}
# External database at "{{ outline_db_schema }}:{{ outline_db_host }}: {{ outline_db_port }}"
{% endif %}
2022-10-05 12:53:35 +02:00
2022-12-08 18:33:59 +01:00
{% if outline_fake_s3 and (outline_fake_s3 != "") %}
2022-10-05 12:53:35 +02:00
s3:
image: lphoward/fake-s3
env_file:
- "{{ outline_setup_path | expanduser | realpath }}/env.s3.conf"
{% if outline_fake_s3_port %}
2022-10-05 12:53:35 +02:00
ports:
- {{ outline_fake_s3_port }}:4569
{% endif %}
volumes:
- {{ outline_volume_s3 | expanduser | realpath }}:/fakes3_root
2022-10-05 12:53:35 +02:00
networks:
- outline
2022-12-07 11:04:33 +01:00
{% endif %}
2022-10-05 12:53:35 +02:00
outline:
image: outlinewiki/outline:latest
2022-12-11 02:18:36 +01:00
#command: sh -c "yarn start"
2023-02-03 14:47:44 +01:00
command: sh -c "yarn db:migrate --env production-ssl-disabled && yarn start"
2022-10-05 12:53:35 +02:00
env_file:
- "{{ outline_setup_path | expanduser | realpath }}/env.outline.conf"
- "{{ outline_setup_path | expanduser | realpath }}/env.oidc.conf"
2022-12-08 18:33:59 +01:00
restart: always
2022-10-05 12:53:35 +02:00
ports:
- {{ outline_port }}:3000
depends_on:
2022-12-08 18:33:59 +01:00
{% if outline_db_schema == 'postgres' and outline_db_host == 'postgres' %}
2022-10-05 12:53:35 +02:00
- postgres
2022-12-08 18:33:59 +01:00
{% endif %}
2022-10-05 12:53:35 +02:00
- redis
2022-12-08 18:33:59 +01:00
{% if outline_fake_s3 and (outline_fake_s3 != "") %}
2022-10-05 12:53:35 +02:00
- s3
2022-12-08 18:33:59 +01:00
{% endif %}
2022-10-05 12:53:35 +02:00
networks:
- outline
networks:
outline: {}