ansible/roles/couchdb/templates/docker-compose.yml.j2

36 lines
1.3 KiB
Django/Jinja

version: "{{ compose_version }}"
networks:
proxy:
name: "{{ traefik_network }}"
volumes:
db:
name: couchdb
services:
couchdb:
image: "couchdb:{{ couchdb_version }}"
container_name: couchdb
networks:
- proxy
volumes:
- db:/opt/couchdb/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
COUCHDB_USER: "{{ couchdb_user }}"
COUCHDB_PASSWORD: "{{ couchdb_password }}"
labels:
traefik.http.routers.couchdb.entrypoints: websecure
traefik.http.routers.couchdb.rule: "Host(`{{ couchdb_subdomain }}.{{ domain_name }}`)"
traefik.http.routers.couchdb.middlewares: cors@docker
traefik.http.services.couchdb.loadbalancer.server.port: 5984
traefik.http.middlewares.cors.headers.accessControlAllowOriginList: https://tempo.agate.blue
traefik.http.middlewares.cors.headers.accessControlAllowCredentials: true
# Cannot use wildcards with creds, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
traefik.http.middlewares.cors.headers.accessControlAllowHeaders: "Content-Type"
traefik.http.middlewares.cors.headers.accessControlAllowMethods: GET, OPTIONS, POST, PUT, DELETE
traefik.enable: true
restart: unless-stopped