2021-11-25 15:04:00 +00:00
|
|
|
---
|
2021-03-19 13:32:35 +00:00
|
|
|
version: "3.8"
|
2021-09-03 07:02:58 +00:00
|
|
|
|
2021-03-19 13:32:35 +00:00
|
|
|
services:
|
2021-05-05 15:28:12 +00:00
|
|
|
web:
|
2023-02-15 16:30:59 +00:00
|
|
|
image: nginx:1.23.3
|
2021-03-19 13:32:35 +00:00
|
|
|
networks:
|
|
|
|
- proxy
|
2021-05-05 15:30:52 +00:00
|
|
|
- internal
|
2021-05-06 08:47:52 +00:00
|
|
|
environment:
|
2021-05-06 14:31:31 +00:00
|
|
|
- DOMAIN
|
2021-05-06 22:32:11 +00:00
|
|
|
- NGINX_WEBSEED_CDN_ENABLED
|
2021-05-06 08:47:52 +00:00
|
|
|
- NGINX_WEBSEED_CDN_URI
|
2021-05-06 22:32:11 +00:00
|
|
|
- NGINX_WEBSEED_PROXY_ENABLED
|
2021-05-06 08:47:52 +00:00
|
|
|
- NGINX_WEBSEED_PROXY_URI
|
2021-05-06 23:41:31 +00:00
|
|
|
- STACK_NAME
|
2021-03-19 16:03:13 +00:00
|
|
|
volumes:
|
|
|
|
- /etc/timezone:/etc/timezone:ro
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
- app-data:/var/www/peertube/storage:ro
|
|
|
|
- app-assets:/var/www/peertube/peertube-latest/client/dist:ro
|
|
|
|
- nginx-tmp:/var/lib/nginx/client-tmp:rw
|
|
|
|
- nginx-cache:/var/cache/nginx/peertube-media-cache:rw
|
|
|
|
configs:
|
|
|
|
- source: nginx_config
|
2021-05-06 22:15:43 +00:00
|
|
|
target: /etc/nginx/nginx.conf
|
2022-08-15 08:44:38 +00:00
|
|
|
healthcheck:
|
|
|
|
test: curl -f http://app:9000/v1/api/ping || exit 1
|
|
|
|
interval: 5s
|
|
|
|
timeout: 3s
|
2022-08-16 12:00:26 +00:00
|
|
|
retries: 20
|
2021-03-19 13:32:35 +00:00
|
|
|
deploy:
|
|
|
|
restart_policy:
|
2022-08-17 09:29:28 +00:00
|
|
|
condition: on-failure
|
2022-08-17 09:34:00 +00:00
|
|
|
update_config:
|
|
|
|
failure_action: rollback
|
|
|
|
order: start-first
|
|
|
|
rollback_config:
|
|
|
|
order: start-first
|
|
|
|
restart_policy:
|
|
|
|
max_attempts: 10
|
2021-03-19 13:32:35 +00:00
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
|
2021-05-05 15:34:05 +00:00
|
|
|
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
|
2021-03-19 13:32:35 +00:00
|
|
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
|
|
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
2021-09-03 07:02:58 +00:00
|
|
|
|
2021-03-19 16:03:13 +00:00
|
|
|
app:
|
2023-02-15 16:30:59 +00:00
|
|
|
image: chocobozzz/peertube:v5.0.1-bullseye
|
2021-03-19 16:03:13 +00:00
|
|
|
environment:
|
2021-05-06 08:47:52 +00:00
|
|
|
- PEERTUBE_ADMIN_EMAIL
|
2021-05-06 08:56:48 +00:00
|
|
|
- PEERTUBE_CONTACT_FORM_ENABLED
|
2021-05-06 09:07:23 +00:00
|
|
|
- PEERTUBE_DB_HOSTNAME=db
|
2021-06-04 06:31:49 +00:00
|
|
|
- PEERTUBE_DB_PORT=5432
|
2021-05-06 09:07:23 +00:00
|
|
|
- PEERTUBE_DB_USERNAME=peertube
|
2021-11-30 10:27:06 +00:00
|
|
|
- PEERTUBE_LIVE_CHAT_ENABLED
|
2022-08-17 09:12:47 +00:00
|
|
|
- PEERTUBE_LOG_PING_REQUESTS
|
2021-05-06 09:07:23 +00:00
|
|
|
- PEERTUBE_REDIS_HOSTNAME=cache
|
2021-05-06 08:47:52 +00:00
|
|
|
- PEERTUBE_SIGNUP_ENABLED
|
2021-11-30 10:27:16 +00:00
|
|
|
- PEERTUBE_SMTP_ENABLED
|
2021-05-06 08:47:52 +00:00
|
|
|
- PEERTUBE_TRANSCODING_ENABLED
|
2021-05-06 12:48:08 +00:00
|
|
|
- PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback", "172.16.0.0/12", "10.0.0.0/8"]
|
2021-05-06 09:12:29 +00:00
|
|
|
- PEERTUBE_WEBSERVER_HOSTNAME=${DOMAIN}
|
2021-05-06 08:47:52 +00:00
|
|
|
- PEERTUBE_WEBSERVER_HTTPS
|
|
|
|
- PEERTUBE_WEBSERVER_PORT
|
2021-03-19 16:03:13 +00:00
|
|
|
volumes:
|
|
|
|
- app-data:/data
|
|
|
|
- app-config:/config
|
2021-07-16 21:03:02 +00:00
|
|
|
- app-assets:/srv/client/dist
|
2021-03-19 16:03:13 +00:00
|
|
|
secrets:
|
|
|
|
- db_password
|
|
|
|
configs:
|
2021-05-06 09:13:46 +00:00
|
|
|
- source: app_entrypoint
|
2021-03-19 16:03:13 +00:00
|
|
|
target: /docker-entrypoint.sh
|
|
|
|
mode: 0555
|
2022-10-13 07:21:10 +00:00
|
|
|
command: node dist/server
|
2021-07-15 16:09:15 +00:00
|
|
|
healthcheck:
|
2022-08-15 08:44:38 +00:00
|
|
|
test: curl -f http://localhost:9000/v1/api/ping || exit 1
|
|
|
|
interval: 10s
|
|
|
|
timeout: 3s
|
2022-08-16 12:00:26 +00:00
|
|
|
retries: 20
|
2021-03-19 16:03:13 +00:00
|
|
|
entrypoint: /docker-entrypoint.sh
|
|
|
|
networks:
|
2021-05-05 15:30:52 +00:00
|
|
|
- internal
|
2021-05-30 13:01:30 +00:00
|
|
|
deploy:
|
2021-11-25 15:05:47 +00:00
|
|
|
labels:
|
2023-02-15 16:30:59 +00:00
|
|
|
- "coop-cloud.${STACK_NAME}.version=4.0.0+v5.0.1-bullseye"
|
2021-09-03 07:02:58 +00:00
|
|
|
|
2021-03-19 16:03:13 +00:00
|
|
|
db:
|
|
|
|
image: postgres:10-alpine
|
|
|
|
environment:
|
2021-05-06 09:07:23 +00:00
|
|
|
- POSTGRES_USER=peertube
|
|
|
|
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
|
|
|
|
- POSTGRES_DB=peertube
|
2021-03-19 16:03:13 +00:00
|
|
|
secrets:
|
|
|
|
- db_password
|
|
|
|
volumes:
|
|
|
|
- postgres-data:/var/lib/postgresql/data
|
|
|
|
networks:
|
2021-05-05 15:30:52 +00:00
|
|
|
- internal
|
2022-08-15 08:44:38 +00:00
|
|
|
healthcheck:
|
2022-10-25 09:14:46 +00:00
|
|
|
test: pg_isready -U peertube
|
2022-08-15 08:44:38 +00:00
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 10
|
2021-09-03 07:02:58 +00:00
|
|
|
|
2021-05-05 15:28:12 +00:00
|
|
|
cache:
|
2022-09-28 12:29:12 +00:00
|
|
|
image: redis:7-alpine
|
2021-03-19 16:03:13 +00:00
|
|
|
volumes:
|
|
|
|
- redis-data:/data
|
|
|
|
networks:
|
2021-05-05 15:30:52 +00:00
|
|
|
- internal
|
2022-08-15 08:44:38 +00:00
|
|
|
healthcheck:
|
|
|
|
test: redis-cli ping
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 10
|
2021-09-03 07:02:58 +00:00
|
|
|
|
2021-03-19 13:32:35 +00:00
|
|
|
networks:
|
2021-05-05 15:30:52 +00:00
|
|
|
internal:
|
2021-03-19 13:32:35 +00:00
|
|
|
proxy:
|
|
|
|
external: true
|
2021-09-03 07:02:58 +00:00
|
|
|
|
2021-03-19 16:03:13 +00:00
|
|
|
volumes:
|
|
|
|
app-data:
|
|
|
|
app-config:
|
|
|
|
app-assets:
|
|
|
|
nginx-tmp:
|
|
|
|
nginx-cache:
|
|
|
|
postgres-data:
|
|
|
|
redis-data:
|
2021-09-03 07:02:58 +00:00
|
|
|
|
2021-03-19 16:03:13 +00:00
|
|
|
configs:
|
|
|
|
nginx_config:
|
|
|
|
name: ${STACK_NAME}_nginx_config_${NGINX_CONFIG_VERSION}
|
|
|
|
file: nginx.conf.tmpl
|
|
|
|
template_driver: golang
|
|
|
|
app_entrypoint:
|
|
|
|
name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION}
|
2021-11-30 10:32:30 +00:00
|
|
|
file: entrypoint.sh.tmpl
|
|
|
|
template_driver: golang
|
2021-09-03 07:02:58 +00:00
|
|
|
|
2021-03-19 16:03:13 +00:00
|
|
|
secrets:
|
|
|
|
db_password:
|
|
|
|
external: true
|
|
|
|
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|