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

78 lines
1.8 KiB
Plaintext
Raw 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 }}:/data
- /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 }}/env.db.conf"
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-07 11:04:33 +01:00
{% if outline_fake_s3 %}
2022-10-05 12:53:35 +02:00
s3:
image: lphoward/fake-s3
env_file:
- "{{ outline_setup_path }}/env.s3.conf"
{% if outline_s3_port %}
ports:
- {{ outline_fake_s3_port }}:4569
{% endif %}
volumes:
- {{ outline_volume_s3 }}:/fakes3_root
networks:
- outline
2022-12-07 11:04:33 +01:00
{% endif %}
2022-10-05 12:53:35 +02:00
outline:
image: outlinewiki/outline:latest
command: sh -c "yarn sequelize:migrate --env production-ssl-disabled && yarn start"
env_file:
- ./env.outline.conf
- ./env.oidc.conf
restart: always
ports:
- {{ outline_port }}:3000
depends_on:
- postgres
- redis
- s3
networks:
- outline
networks:
outline: {}