pleroma-docker/docker-compose.m4

71 lines
1.9 KiB
Plaintext
Raw Normal View History

divert(-1)
define(`upcase', `translit($1, `a-z', `A-Z')')
2018-04-08 11:04:06 -04:00
define(`env', `upcase($1): ${upcase($1):?upcase($1)}')
define(`env_fb', `upcase($1): ${upcase($1):-$2}')
define(`env_inline', `${upcase($1):?upcase($1)}')
2018-04-08 16:49:07 -04:00
define(`env_inline_fb', `${upcase($1):-$2}')
divert(1)dnl
version: "3"
networks:
default:
external:
2018-04-08 16:49:07 -04:00
name: env_inline_fb(`docker_network', `pleroma_docker_1')
services:
db:
image: postgres:10.3-alpine
restart: unless-stopped
environment:
env(`postgres_db')
env(`postgres_user')
env(`postgres_password')
volumes:
- env_inline(`docker_datadir')/db:/var/lib/postgresql/data
2018-04-08 16:49:07 -04:00
- ./initdb.sql:/docker-entrypoint-initdb.d/pleroma.sql
server:
build:
context: .
dockerfile: ./pleroma.dockerfile
2018-04-08 16:49:07 -04:00
args:
env(`pleroma_version')
env_fb(`mix_env', `prod')
restart: unless-stopped
links:
- db
environment:
2018-04-08 11:04:06 -04:00
env_fb(`postgres_ip', `db')
env(`postgres_db')
env(`postgres_user')
env(`postgres_password')
env(`pleroma_url')
env(`pleroma_scheme')
env(`pleroma_port')
env(`pleroma_secret_key_base')
env(`pleroma_name')
env(`pleroma_admin_email')
env(`pleroma_user_limit')
env(`pleroma_registrations_open')
env(`pleroma_media_proxy_enabled')
env(`pleroma_media_proxy_redirect_on_failure')
env(`pleroma_media_proxy_url')
2018-04-08 11:04:06 -04:00
env(`pleroma_db_pool_size')
env_fb(`mix_env', `prod')
volumes:
2018-04-08 16:49:07 -04:00
- ./custom.d:/custom.d
labels:
traefik.enable: "true"
traefik.fe.port: "4000"
traefik.fe.protocol: "http"
traefik.fe.entryPoints: "http,https"
traefik.fe.frontend.rule: "Host:env_inline(`pleroma_url')"
traefik.cache.port: "80"
traefik.cache.protocol: "http"
traefik.cache.entryPoints: "http,https"
traefik.cache.frontend.rule: "Host:env_inline(`pleroma_media_proxy_url')"