aboutsummaryrefslogtreecommitdiff
path: root/services/templates/docker-compose.yaml.template
diff options
context:
space:
mode:
Diffstat (limited to 'services/templates/docker-compose.yaml.template')
-rw-r--r--services/templates/docker-compose.yaml.template146
1 files changed, 146 insertions, 0 deletions
diff --git a/services/templates/docker-compose.yaml.template b/services/templates/docker-compose.yaml.template
new file mode 100644
index 0000000..d6640ef
--- /dev/null
+++ b/services/templates/docker-compose.yaml.template
@@ -0,0 +1,146 @@
+services:
+
+ blog:
+ pull_policy: build
+ build:
+ context: ./@@CRUPEST_DOCKER_DIR@@/blog
+ dockerfile: Dockerfile
+ pull: true
+ volumes:
+ - "blog-public:/public"
+ restart: on-failure:3
+
+ nginx:
+ pull_policy: build
+ build:
+ context: ./@@CRUPEST_DOCKER_DIR@@/nginx
+ dockerfile: Dockerfile
+ pull: true
+ ports:
+ - "80:80"
+ - "443:443"
+ - "443:443/udp"
+ volumes:
+ - "./@@CRUPEST_GENERATED_NGINX_DIR@@/conf.d:/etc/nginx/conf.d:ro"
+ - "./@@CRUPEST_GENERATED_NGINX_DIR@@/common:/etc/nginx/common:ro"
+ - "./@@CRUPEST_DATA_CERTBOT_DIR@@/certs:/etc/letsencrypt"
+ - "./@@CRUPEST_DATA_CERTBOT_DIR@@/webroot:/srv/acme:ro"
+ - "./@@CRUPEST_DATA_CERTBOT_DIR@@/data:/var/lib/letsencrypt"
+ - "./@@CRUPEST_DATA_CERTBOT_DIR@@/webroot:/var/www/certbot"
+ - "blog-public:/srv/www/blog:ro"
+ restart: on-failure:3
+
+ v2ray:
+ pull_policy: build
+ build:
+ context: ./@@CRUPEST_DOCKER_DIR@@/v2ray
+ dockerfile: Dockerfile
+ pull: true
+ hostname: v2ray
+ command: [ "run", "-c", "/etc/v2fly/config.json" ]
+ volumes:
+ - "./@@CRUPEST_GENERATED_DIR@@/v2ray-config.json:/etc/v2fly/config.json:ro"
+ restart: on-failure:3
+
+ auto-backup:
+ pull_policy: build
+ build:
+ context: ./@@CRUPEST_DOCKER_DIR@@/auto-backup
+ dockerfile: Dockerfile
+ pull: true
+ environment:
+ - "CRUPEST_AUTO_BACKUP_COS_ENDPOINT=@@CRUPEST_AUTO_BACKUP_COS_ENDPOINT@@"
+ - "CRUPEST_AUTO_BACKUP_COS_BUCKET=@@CRUPEST_AUTO_BACKUP_COS_BUCKET@@"
+ - "CRUPEST_AUTO_BACKUP_COS_SECRET_ID=@@CRUPEST_AUTO_BACKUP_COS_SECRET_ID@@"
+ - "CRUPEST_AUTO_BACKUP_COS_SECRET_KEY=@@CRUPEST_AUTO_BACKUP_COS_SECRET_KEY@@"
+ volumes:
+ - "./data:/data"
+ restart: on-failure:3
+
+ mailserver:
+ image: docker.io/mailserver/docker-mailserver:latest
+ pull_policy: always
+ container_name: mailserver
+ hostname: mail.@@CRUPEST_DOMAIN@@
+ env_file: ./@@CRUPEST_GENERATED_DIR@@/mailserver.env
+ # More information about the mail-server ports:
+ # https://docker-mailserver.github.io/docker-mailserver/edge/config/security/understanding-the-ports/
+ # To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
+ ports:
+ - "25:25" # SMTP (explicit TLS => STARTTLS)
+ - "143:143" # IMAP4 (explicit TLS => STARTTLS)
+ - "465:465" # ESMTP (implicit TLS)
+ - "587:587" # ESMTP (explicit TLS => STARTTLS)
+ - "993:993" # IMAP4 (implicit TLS)
+ - "4190:4190" # manage sieve protocol
+ volumes:
+ - ./@@CRUPEST_DATA_MAILSERVER_DIR@@/mail-data/:/var/mail/
+ - ./@@CRUPEST_DATA_MAILSERVER_DIR@@/mail-state/:/var/mail-state/
+ - ./@@CRUPEST_DATA_MAILSERVER_DIR@@/mail-logs/:/var/log/mail/
+ - ./@@CRUPEST_DATA_MAILSERVER_DIR@@/config/:/tmp/docker-mailserver/
+ - ./@@CRUPEST_DATA_CERTBOT_DIR@@/certs:/etc/letsencrypt
+ - /etc/localtime:/etc/localtime:ro
+ restart: on-failure:3
+ stop_grace_period: 1m
+ healthcheck:
+ test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
+ timeout: 3s
+ retries: 0
+
+ git-server:
+ pull_policy: build
+ build:
+ context: ./@@CRUPEST_DOCKER_DIR@@/git-server
+ dockerfile: Dockerfile
+ pull: true
+ hostname: git-server
+ volumes:
+ - "./@@CRUPEST_DATA_GIT_DIR@@:/git"
+ - "./@@CRUPEST_GENERATED_DIR@@/cgitrc:/etc/cgitrc:ro"
+ restart: on-failure:3
+
+ roundcubemail:
+ image: roundcube/roundcubemail:latest
+ pull_policy: always
+ hostname: roundcubemail
+ volumes:
+ - ./@@CRUPEST_DATA_SECRET_DIR@@/gnupg:/gnupg
+ - ./@@CRUPEST_DATA_ROUNDCUBE_DIR@@/www/html:/var/www/html
+ - ./@@CRUPEST_DATA_ROUNDCUBE_DIR@@/db:/var/roundcube/db
+ - ./@@CRUPEST_DATA_ROUNDCUBE_DIR@@/config:/var/roundcube/config
+ - roundcubemail-temp:/tmp/roundcube-temp
+ environment:
+ - ROUNDCUBEMAIL_DEFAULT_HOST=ssl://@@CRUPEST_MAIL_SERVER_DOMAIN@@
+ - ROUNDCUBEMAIL_DEFAULT_PORT=993
+ - ROUNDCUBEMAIL_SMTP_SERVER=ssl://@@CRUPEST_MAIL_SERVER_DOMAIN@@
+ - ROUNDCUBEMAIL_SMTP_PORT=465
+ - ROUNDCUBEMAIL_DB_TYPE=sqlite
+ - ROUNDCUBEMAIL_PLUGINS=archive,enigma,jqueryui,newmail_notifier,show_additional_headers,userinfo,zipdownload,managesieve
+ restart: on-failure:3
+
+ 2fauth:
+ image: 2fauth/2fauth
+ pull_policy: always
+ hostname: 2fauth
+ volumes:
+ - ./data/2fauth:/2fauth
+ environment:
+ - APP_NAME=2FAuth-crupest
+ - APP_TIMEZONE=UTC
+ - SITE_OWNER=@@CRUPEST_EMAIL@@
+ - APP_KEY=@@CRUPEST_2FAUTH_APP_KEY@@
+ - APP_URL=@@CRUPEST_ROOT_URL@@2fa
+ - APP_SUBDIRECTORY=2fa
+ - MAIL_MAILER=smtp
+ - MAIL_HOST=@@CRUPEST_MAIL_SERVER_DOMAIN@@
+ - MAIL_PORT=465
+ - MAIL_USERNAME=@@CRUPEST_2FAUTH_MAIL_USERNAME@@
+ - MAIL_PASSWORD=@@CRUPEST_2FAUTH_MAIL_PASSWORD@@
+ - MAIL_ENCRYPTION=ssl
+ - MAIL_FROM_NAME=2FAuth-crupest
+ - MAIL_FROM_ADDRESS=@@CRUPEST_2FAUTH_MAIL_USERNAME@@
+ - TRUSTED_PROXIES=*
+
+volumes:
+ blog-public:
+ roundcubemail-temp: