2023-04-09 17:01:07 +02:00
|
|
|
services:
|
|
|
|
|
|
|
|
|
|
nginx-proxy:
|
|
|
|
|
build: ./nginx
|
|
|
|
|
container_name: nginx-proxy
|
2026-02-27 09:16:37 +01:00
|
|
|
networks:
|
|
|
|
|
default:
|
|
|
|
|
ipv4_address: 172.18.0.5
|
2023-04-09 17:01:07 +02:00
|
|
|
ports:
|
|
|
|
|
- "80:80"
|
|
|
|
|
- "443:443"
|
|
|
|
|
restart: always
|
|
|
|
|
#environment:
|
2026-02-23 20:24:09 +01:00
|
|
|
# - HTTPS_METHOD=noredirect
|
2023-04-09 17:01:07 +02:00
|
|
|
volumes:
|
|
|
|
|
- ./nginx/conf.d:/etc/nginx/conf.d
|
|
|
|
|
- ./nginx/vhost.d:/etc/nginx/vhost.d
|
|
|
|
|
- ./nginx/bots.d:/etc/nginx/bots.d
|
|
|
|
|
- ./nginx/certs:/etc/nginx/certs:rw
|
|
|
|
|
- nginx:/usr/share/nginx/html
|
|
|
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
2026-02-23 20:24:09 +01:00
|
|
|
- ./nginx/crontab:/etc/crontabs/root:ro
|
2023-04-09 17:01:07 +02:00
|
|
|
|
|
|
|
|
acme-companion:
|
2026-02-23 20:24:09 +01:00
|
|
|
image: nginxproxy/acme-companion:2.6.2
|
2023-04-09 17:01:07 +02:00
|
|
|
container_name: nginx-proxy-acme
|
|
|
|
|
environment:
|
|
|
|
|
- DEFAULT_EMAIL=${EMAIL}
|
|
|
|
|
# Uncomment this for testing
|
2023-04-15 13:44:18 +02:00
|
|
|
#- LETSENCRYPT_TEST=true
|
2023-04-09 17:01:07 +02:00
|
|
|
volumes_from:
|
|
|
|
|
- nginx-proxy
|
|
|
|
|
volumes:
|
|
|
|
|
- ./nginx/conf.d:/etc/nginx/conf.d
|
|
|
|
|
- ./nginx/vhost.d:/etc/nginx/vhost.d
|
|
|
|
|
- ./nginx/certs:/etc/nginx/certs:rw
|
|
|
|
|
- nginx:/usr/share/nginx/html
|
|
|
|
|
- acme:/etc/acme.sh
|
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
|
depends_on:
|
|
|
|
|
- nginx-proxy
|
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
|
|
portfolio:
|
|
|
|
|
container_name: portfolio
|
2026-02-23 20:24:09 +01:00
|
|
|
build:
|
|
|
|
|
context: ./portfolio
|
|
|
|
|
args:
|
|
|
|
|
- PASSWORD=${PASSWORD}
|
2023-04-09 17:01:07 +02:00
|
|
|
volumes:
|
|
|
|
|
- portfolio:/src/node_modules
|
2026-02-23 20:24:09 +01:00
|
|
|
- ./portfolio/server/data:/src/server/data
|
2023-06-16 16:32:50 +02:00
|
|
|
environment:
|
2026-02-23 20:24:09 +01:00
|
|
|
- PASSWORD=${PASSWORD}
|
2023-06-16 16:32:50 +02:00
|
|
|
- VIRTUAL_HOST=${DOMAIN},www.${DOMAIN}
|
|
|
|
|
- VIRTUAL_PATH=/
|
2023-06-28 11:44:41 +02:00
|
|
|
- VIRTUAL_PORT=5000
|
2026-02-23 20:24:09 +01:00
|
|
|
- LETSENCRYPT_HOST=${DOMAIN},www.${DOMAIN},gitea.${DOMAIN}
|
2023-06-28 11:44:41 +02:00
|
|
|
- LETSENCRYPT_EMAIL=${EMAIL}
|
2023-06-16 16:32:50 +02:00
|
|
|
restart: always
|
2023-08-28 19:27:17 +02:00
|
|
|
depends_on:
|
2026-02-23 20:24:09 +01:00
|
|
|
nginx-proxy:
|
2023-04-09 17:01:07 +02:00
|
|
|
condition: service_started
|
|
|
|
|
|
|
|
|
|
|
2026-02-23 20:24:09 +01:00
|
|
|
forgejo:
|
|
|
|
|
image: codeberg.org/forgejo/forgejo:7
|
|
|
|
|
container_name: forgejo
|
2023-04-09 17:01:07 +02:00
|
|
|
environment:
|
|
|
|
|
- USER_UID=1000
|
|
|
|
|
- USER_GID=1000
|
2026-02-23 20:24:09 +01:00
|
|
|
- FORGEJO__database__DB_TYPE=mysql
|
|
|
|
|
- FORGEJO__database__HOST=mysql-forgejo
|
|
|
|
|
- FORGEJO__database__NAME=forgejo
|
|
|
|
|
- FORGEJO__database__USER=${USER}
|
|
|
|
|
- FORGEJO__database__PASSWD=${PASSWORD}
|
|
|
|
|
- FORGEJO__server__LANDING_PAGE=/${USER}
|
|
|
|
|
- FORGEJO__attachment__MAX_SIZE=5000
|
|
|
|
|
- FORGEJO__server__ROOT_URL=https://${DOMAIN}/code/
|
2023-04-09 17:01:07 +02:00
|
|
|
- HTTP_PORT=4000
|
|
|
|
|
- LFS_START_SERVER=true
|
|
|
|
|
- DISABLE_REGISTRATION=true
|
|
|
|
|
- RUN_MODE=prod
|
2023-04-15 13:44:18 +02:00
|
|
|
- VIRTUAL_HOST=${DOMAIN},www.${DOMAIN},gitea.${DOMAIN} # this last one is for legacy support
|
2023-04-09 17:01:07 +02:00
|
|
|
- VIRTUAL_PORT=4000
|
|
|
|
|
- VIRTUAL_PATH=/code/
|
|
|
|
|
- VIRTUAL_DEST=/
|
|
|
|
|
restart: always
|
|
|
|
|
volumes:
|
2026-02-23 20:24:09 +01:00
|
|
|
- ./forgejo:/data
|
2023-04-09 17:01:07 +02:00
|
|
|
- /etc/timezone:/etc/timezone:ro
|
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
|
depends_on:
|
2026-02-23 20:24:09 +01:00
|
|
|
mysql-forgejo:
|
2023-04-09 17:01:07 +02:00
|
|
|
condition: service_healthy
|
|
|
|
|
|
2026-02-23 20:24:09 +01:00
|
|
|
mysql-forgejo:
|
|
|
|
|
image: mariadb:10.11
|
|
|
|
|
container_name: mysql-forgejo
|
2023-04-09 17:01:07 +02:00
|
|
|
restart: always
|
|
|
|
|
environment:
|
|
|
|
|
- MYSQL_ROOT_PASSWORD=${PASSWORD}
|
|
|
|
|
- MYSQL_PASSWORD=${PASSWORD}
|
|
|
|
|
- MYSQL_DATABASE=gitea
|
|
|
|
|
- MYSQL_USER=${USER}
|
|
|
|
|
volumes:
|
2026-02-23 20:24:09 +01:00
|
|
|
- ./forgejo/mysql:/var/lib/mysql
|
2023-04-09 17:01:07 +02:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
|
|
|
|
interval: 15s
|
|
|
|
|
start_period: 20s
|
|
|
|
|
|
|
|
|
|
nextcloud:
|
2026-02-23 20:24:09 +01:00
|
|
|
image: nextcloud:31-apache
|
2023-04-09 17:01:07 +02:00
|
|
|
container_name: nextcloud
|
|
|
|
|
restart: always
|
|
|
|
|
volumes:
|
2023-04-14 12:59:48 +02:00
|
|
|
- ./nextcloud/html:/var/www/html
|
2023-04-09 17:01:07 +02:00
|
|
|
environment:
|
|
|
|
|
- MYSQL_DATABASE=nextcloud
|
|
|
|
|
- MYSQL_USER=${USER}
|
|
|
|
|
- MYSQL_PASSWORD=${PASSWORD}
|
|
|
|
|
- MYSQL_HOST=mysql-nextcloud
|
|
|
|
|
- NEXTCLOUD_ADMIN_USER=${USER}
|
|
|
|
|
- NEXTCLOUD_ADMIN_PASSWORD=${PASSWORD}
|
2023-04-15 13:44:18 +02:00
|
|
|
- NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN} www.${DOMAIN}
|
2026-02-23 20:24:09 +01:00
|
|
|
- NEXTCLOUD_EXTRA_APPS=calendar,richdocuments
|
2023-04-15 13:44:18 +02:00
|
|
|
- APACHE_DISABLE_REWRITE_IP=1
|
2023-04-15 03:44:08 +02:00
|
|
|
- TRUSTED_PROXIES=nginx-proxy
|
2026-02-23 20:24:09 +01:00
|
|
|
- REDIS_HOST=redis
|
2023-04-15 13:44:18 +02:00
|
|
|
- OVERWRITEHOST=${DOMAIN}
|
|
|
|
|
- OVERWRITEWEBROOT=/cloud
|
|
|
|
|
- OVERWRITEPROTOCOL=https
|
2023-06-03 11:39:21 +02:00
|
|
|
- OVERWRITECLIURL=https://unboundedpress.org
|
2023-04-15 13:44:18 +02:00
|
|
|
- VIRTUAL_HOST=${DOMAIN},www.${DOMAIN}
|
|
|
|
|
- VIRTUAL_PATH=/cloud/
|
2023-04-09 17:01:07 +02:00
|
|
|
- VIRTUAL_DEST=/
|
2026-02-27 09:16:37 +01:00
|
|
|
extra_hosts:
|
|
|
|
|
- "${DOMAIN}:172.18.0.5"
|
2023-04-09 17:01:07 +02:00
|
|
|
depends_on:
|
|
|
|
|
mysql-nextcloud:
|
|
|
|
|
condition: service_healthy
|
2026-02-23 20:24:09 +01:00
|
|
|
redis:
|
|
|
|
|
condition: service_started
|
2023-04-09 17:01:07 +02:00
|
|
|
|
2023-06-03 11:39:21 +02:00
|
|
|
collabora:
|
2026-02-23 20:24:09 +01:00
|
|
|
image: collabora/code:latest
|
2023-06-03 11:39:21 +02:00
|
|
|
container_name: collabora
|
|
|
|
|
depends_on:
|
2026-02-23 20:24:09 +01:00
|
|
|
nginx-proxy:
|
|
|
|
|
condition: service_started
|
|
|
|
|
nextcloud:
|
|
|
|
|
condition: service_started
|
2023-06-03 11:39:21 +02:00
|
|
|
cap_add:
|
|
|
|
|
- MKNOD
|
2026-02-27 09:16:37 +01:00
|
|
|
extra_hosts:
|
|
|
|
|
- "${DOMAIN}:172.18.0.5"
|
2023-06-03 11:39:21 +02:00
|
|
|
environment:
|
|
|
|
|
- username=${USER}
|
|
|
|
|
- password=${PASSWORD}
|
|
|
|
|
- domain=${DOMAIN}
|
2026-02-27 09:16:37 +01:00
|
|
|
- server_name=${DOMAIN}
|
|
|
|
|
- aliasgroup1=https://${DOMAIN}:443
|
2023-06-03 11:39:21 +02:00
|
|
|
- VIRTUAL_HOST=${DOMAIN},www.${DOMAIN}
|
|
|
|
|
- VIRTUAL_PATH=/collab/
|
|
|
|
|
- VIRTUAL_DEST=/
|
|
|
|
|
# Extra parameters to Collabora, see also
|
|
|
|
|
# https://www.collaboraoffice.com/code/nginx-reverse-proxy/:
|
|
|
|
|
# SSL terminates at the proxy
|
|
|
|
|
- extra_params=--o:ssl.enable=false --o:ssl.termination=true
|
2023-06-03 16:02:54 +02:00
|
|
|
# NOTE: The file nginx/vhosts.d/unboundedpress.org handles
|
|
|
|
|
# routing for collabora on production only
|
2023-06-03 11:39:21 +02:00
|
|
|
|
2023-05-29 13:56:42 +02:00
|
|
|
cron-nextcloud:
|
2026-02-23 20:24:09 +01:00
|
|
|
image: nextcloud:31-apache
|
2023-05-29 14:07:42 +02:00
|
|
|
container_name: cron-nextcloud
|
2023-05-29 13:56:42 +02:00
|
|
|
restart: always
|
|
|
|
|
volumes:
|
|
|
|
|
- ./nextcloud/html:/var/www/html
|
|
|
|
|
entrypoint: /cron.sh
|
2026-02-23 20:24:09 +01:00
|
|
|
environment:
|
|
|
|
|
- NEXTCLOUD_EXTRA_APPS=calendar,richdocuments
|
|
|
|
|
- REDIS_HOST=redis
|
2023-05-29 13:56:42 +02:00
|
|
|
depends_on:
|
|
|
|
|
mysql-nextcloud:
|
|
|
|
|
condition: service_healthy
|
2026-02-23 20:24:09 +01:00
|
|
|
redis:
|
|
|
|
|
condition: service_started
|
2023-05-29 13:56:42 +02:00
|
|
|
|
2023-04-09 17:01:07 +02:00
|
|
|
mysql-nextcloud:
|
2026-02-23 20:24:09 +01:00
|
|
|
image: mariadb:10.11
|
2023-04-09 17:01:07 +02:00
|
|
|
container_name: mysql-nextcloud
|
|
|
|
|
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
|
|
|
|
|
restart: always
|
|
|
|
|
environment:
|
|
|
|
|
- MYSQL_ROOT_PASSWORD=${PASSWORD}
|
|
|
|
|
- MYSQL_PASSWORD=${PASSWORD}
|
|
|
|
|
- MYSQL_DATABASE=nextcloud
|
|
|
|
|
- MYSQL_USER=${USER}
|
|
|
|
|
volumes:
|
|
|
|
|
- ./nextcloud/mysql:/var/lib/mysql
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
|
|
|
|
interval: 15s
|
|
|
|
|
start_period: 20s
|
|
|
|
|
|
2026-02-23 20:24:09 +01:00
|
|
|
redis:
|
|
|
|
|
image: redis:alpine
|
|
|
|
|
container_name: redis
|
|
|
|
|
restart: always
|
|
|
|
|
volumes:
|
|
|
|
|
- ./redis:/data
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 3
|
|
|
|
|
|
2023-04-09 17:01:07 +02:00
|
|
|
volumes:
|
|
|
|
|
nginx:
|
|
|
|
|
acme:
|
|
|
|
|
portfolio:
|
2026-02-27 09:16:37 +01:00
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
default:
|
|
|
|
|
ipam:
|
|
|
|
|
driver: default
|
|
|
|
|
config:
|
|
|
|
|
- subnet: 172.18.0.0/16
|