54 lines
1.5 KiB
Docker
54 lines
1.5 KiB
Docker
# DOMAIN=example.com docker stack deploy -c etherpad.yml etherpad
|
|
# chown -R 5001:5001 plugins var
|
|
|
|
services:
|
|
web:
|
|
image: ${IMAGE:-etherpad/etherpad}:${VERSION:-develop}
|
|
volumes:
|
|
- ${VOLUME_PATH}plugins:/opt/etherpad-lite/src/plugin_packages
|
|
- ${VOLUME_PATH}var:/opt/etherpad-lite/var
|
|
environment:
|
|
- NODE_ENV=production
|
|
- DB_TYPE=postgres
|
|
- DB_HOST=postgres
|
|
- DB_NAME=etherpad
|
|
- DB_USER=etherpad
|
|
- DB_PASS=myp@ssw0rd
|
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-myp@ssw0rd}
|
|
deploy:
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.etherpad-${NUMBER:-1}.rule=Host(`${DOMAIN:-etherpad.localhost}`)
|
|
- traefik.http.routers.etherpad-${NUMBER:-1}.entrypoints=${SCHEME:-https}
|
|
- traefik.http.routers.etherpad-${NUMBER:-1}.service=etherpad-${NUMBER:-1}
|
|
- traefik.http.routers.etherpad-${NUMBER:-1}.tls.certresolver=letsencrypt
|
|
- traefik.http.services.etherpad-${NUMBER:-1}.loadbalancer.server.port=9001
|
|
networks:
|
|
- traefik
|
|
- internal
|
|
|
|
postgres:
|
|
image: postgres:${POSTGRES_VERSION:-12-alpine}
|
|
environment:
|
|
- POSTGRES_DB=etherpad
|
|
- POSTGRES_USER=etherpad
|
|
- POSTGRES_PASSWORD=myp@ssw0rd
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "etherpad"]
|
|
volumes:
|
|
- ${VOLUME_PATH}postgres:/var/lib/postgresql/data
|
|
networks:
|
|
- internal
|
|
|
|
volumes:
|
|
var:
|
|
plugins:
|
|
postgres:
|
|
|
|
networks:
|
|
internal:
|
|
driver: overlay
|
|
attachable: true
|
|
traefik:
|
|
external: true
|
|
name: traefik-net
|