Initial commit

This commit is contained in:
Trey Blancher 2022-11-27 15:35:27 -05:00
parent 072ada8a65
commit 146b00ed43
2 changed files with 317 additions and 0 deletions

113
.env Normal file
View File

@ -0,0 +1,113 @@
COMMENTO_VERSION='v1.8.7'
GHOST_VERSION=5.23.0
GITEA_VERSION=1.17.3
MARIADB_VERSION=10.8.3
MYSQLDB_VERSION=8.0.29
NGINX_VERSION=1.22.1
POSTGRES_VERSION=13.7
GMAIL_HOST=smtp.gmail.com
GMAIL_PORT=587
GMAIL_USER=redacted
GMAIL_PASS='redacted'
COMMENTO_AKISMET_API_KEY='redacted'
MARIADB_CONTAINER_PORT="3306"
MARIADB_HOST_DATA_DIR=/data/mariadb/data
MARIADB_CONTAINER_DATA_DIR=/var/lib/mysql
MARIADB_HOST_LOG_DIR=/data/mariadb/data/log
MARIADB_CONTAINER_LOG_DIR=/var/log/mysql
MARIADB_HOST_CONF=/data/mariadb/conf/mariadb.cnf
MARIADB_CONTAINER_CONF=/etc/mysql/mariadb.cnf
MARIADB_HOST_INIT=/data/mariadb/init
MARIADB_CONTAINER_INIT=/docker-entrypoint-initdb.d
MARIADB_USER=mariadb
MARIADB_ROOT_PASSWORD='redacted'
MYSQLDB_CONTAINER_PORT="3306"
MYSQLDB_HOST_DATA_DIR=/data/mysql/data
MYSQLDB_CONTAINER_DATA_DIR=/var/lib/mysql
MYSQLDB_HOST_LOG_DIR=/data/mysql/log
MYSQLDB_CONTAINER_LOG_DIR=/var/log/mysql
MYSQLDB_HOST_CONF=/data/mysql/conf/mysql.cnf
MYSQLDB_CONTAINER_CONF=/etc/mysql/mysql.cnf
MYSQLDB_HOST_INIT=/data/mysql/init
MYSQLDB_CONTAINER_INIT=/docker-entrypoint-initdb.d
MYSQL_USER=mysql
MYSQL_ROOT_PASSWORD='redacted'
POSTGRES_CONTAINER_PORT=5432
POSTGRES_PASS='redacted'
POSTGRES_HOST_DIR=/data/postgres/databases
POSTGRES_CONTAINER_DIR=/var/lib/postgres/data
POSTGRES_HOST_INIT=/data/postgres/init
POSTGRES_CONTAINER_INIT=/docker-entrypoint-initdb.d
POSTGRES_HOST_ETC=/data/postgres/conf
POSTGRES_CONTAINER_ETC=/etc/postgres
POSTGRES_USER=postgres
POSTGRES_PASSWD=/etc/passwd
POSTGRES_CONTAINER_PASSWD=/etc/passwd
APRILANDTREY_GHOST_CONTAINER_PORT=2368
APRILANDTREY_GHOST_URL=https://aprilandtrey.us
APRILANDTREY_GHOST_HOST_DIR=/data/nginx/www/aprilandtrey.us
APRILANDTREY_GHOST_CONTAINER_DIR=/var/lib/ghost/content
APRILANDTREY_GHOST_DATABASE_CLIENT=mysql
APRILANDTREY_GHOST_DATABASE_HOST=mysql
APRILANDTREY_GHOST_DATABASE_USER=aprilandtrey
APRILANDTREY_GHOST_DATABASE_PASS='redacted'
APRILANDTREY_GHOST_DATABASE=aprilandtrey
APRILANDTREY_COMMENTO_CONTAINER_PORT=8080
APRILANDTREY_COMMENTO_ORIGIN=https://commento.aprilandtrey.us
APRILANDTREY_COMMENTO_DATABASE=aprilandtrey
APRILANDTREY_COMMENTO_USER=aprilandtrey
APRILANDTREY_COMMENTO_PASS='redacted'
APRILANDTREY_COMMENTO_URL="postgres://${APRILANDTREY_COMMENTO_USER}:${APRILANDTREY_COMMENTO_PASS}@postgresdb:${POSTGRES_CONTAINER_PORT}/${APRILANDTREY_COMMENTO_DATABASE}?sslmode=disable"
ELDON_GHOST_CONTAINER_PORT=2368
ELDON_GHOST_URL=https://eldon.me
ELDON_GHOST_HOST_DIR=/data/nginx/www/eldon.me
ELDON_GHOST_CONTAINER_DIR=/var/lib/ghost/content
ELDON_GHOST_DATABASE_CLIENT=mysql
ELDON_GHOST_DATABASE_HOST=mysql
ELDON_GHOST_DATABASE_USER=eldon
ELDON_GHOST_DATABASE_PASS='redacted'
ELDON_GHOST_DATABASE=eldon
ELDON_COMMENTO_CONTAINER_PORT=8080
ELDON_COMMENTO_ORIGIN=https://commento.eldon.me
ELDON_COMMENTO_DATABASE=eldon
ELDON_COMMENTO_USER=eldon
ELDON_COMMENTO_PASS='redacted'
ELDON_COMMENTO_URL="postgres://${ELDON_COMMENTO_USER}:${ELDON_COMMENTO_PASS}@postgresdb:${POSTGRES_CONTAINER_PORT}/${ELDON_COMMENTO_DATABASE}?sslmode=disable"
GITEA_USER=git
GITEA_USER_UID=1001
GITEA_USER_GID=1001
GITEA_DATABASE_TYPE=mysql
GITEA_DATABASE_USER=gitea
GITEA_DATABASE_HOST=mariadb:3306
GITEA_DATABASE_PASS='redacted'
GITEA_DATABASE=gitea
GITEA_HOST_DATA="/data/gitea"
GITEA_CONTAINER_DATA="/data"
GITEA_CONTAINER_PORT="3000"
GITEA_HOST_SSH_PORT="0.0.0.0:redacted"
GITEA_CONTAINER_SSH_PORT="22"
GITEA_HOST_SSH_DIR="/home/git/.ssh"
GITEA_CONTAINER_SSH_DIR="${GITEA_CONTAINER_DATA}/.ssh"
NGINX_HOST_HTTPS_PORT="0.0.0.0:443"
NGINX_CONTAINER_HTTPS_PORT=443
NGINX_HOST_HTTP_PORT="0.0.0.0:80"
NGINX_CONTAINER_HTTP_PORT=80
NGINX_HOST_ETC=/data/nginx/etc
NGINX_CONTAINER_ETC=/etc/nginx/
NGINX_HOST_CACHE=/data/nginx/cache
NGINX_CONTAINER_CACHE=/var/cache/nginx
NGINX_HOST_RUN=/data/nginx/run
NGINX_CONTAINER_RUN=/run/nginx
NGINX_HOST_CERTS_DIR=/etc/letsencrypt
NGINX_CONTAINER_CERTS_DIR=/etc/letsencrypt
NGINX_HOST_LOG_DIR=/data/nginx/log
NGINX_CONTAINER_LOG_DIR=/var/log/nginx/
NGINX_HOST_WEB_ROOT=/data/nginx/www
NGINX_CONTAINER_WEB_ROOT=/var/www

204
docker-compose.yml Normal file
View File

@ -0,0 +1,204 @@
version: "3.8"
networks:
deltachunk-ext:
driver_opts:
com.docker.network.bridge.host_binding_ipv4: "127.0.0.1"
deltachunk-int:
driver_opts:
com.docker.network.bridge.host_binding_ipv4: "127.0.0.1"
services:
nginx:
image: nginx:${NGINX_VERSION}
container_name: nginx
restart: unless-stopped
networks:
- deltachunk-ext
- deltachunk-int
ports:
- "${NGINX_HOST_HTTPS_PORT}:${NGINX_CONTAINER_HTTPS_PORT}"
- "${NGINX_HOST_HTTP_PORT}:${NGINX_CONTAINER_HTTP_PORT}"
volumes:
- "${NGINX_HOST_ETC}:${NGINX_CONTAINER_ETC}:ro"
- "${NGINX_HOST_WEB_ROOT}:${NGINX_CONTAINER_WEB_ROOT}:ro"
- "${NGINX_HOST_CERTS_DIR}:${NGINX_CONTAINER_CERTS_DIR}:ro"
- "${NGINX_HOST_LOG_DIR}:${NGINX_CONTAINER_LOG_DIR}"
- "${NGINX_HOST_CACHE}:${NGINX_CONTAINER_CACHE}"
- "${NGINX_HOST_RUN}:${NGINX_CONTAINER_RUN}"
depends_on:
- gitea
- aprilandtrey
- commento_aprilandtrey
- eldon
- commento_eldon
links:
- gitea
- aprilandtrey
- commento_aprilandtrey
- eldon
- commento_eldon
gitea:
image: gitea/gitea:${GITEA_VERSION}
container_name: gitea
environment:
- USER=${GITEA_USER}
- USER_UID=${GITEA_USER_UID}
- USER_GID=${GITEA_USER_GID}
- GITEA__database__DB_TYPE=${GITEA_DATABASE_TYPE}
- GITEA__database__HOST=${GITEA_DATABASE_HOST}
- GITEA__database__USER=${GITEA_DATABASE_USER}
- GITEA__database__PASSWD=${GITEA_DATABASE_PASS}
- GITEA__database__NAME=${GITEA_DATABASE}
depends_on:
- mariadb
restart: unless-stopped
networks:
- deltachunk-int
ports:
- "${GITEA_CONTAINER_PORT}"
- "${GITEA_HOST_SSH_PORT}:${GITEA_CONTAINER_SSH_PORT}"
volumes:
- "${GITEA_CONTAINER_DATA}/.snapshots/"
- "${GITEA_HOST_DATA}:${GITEA_CONTAINER_DATA}"
- "${GITEA_HOST_SSH_DIR}:${GITEA_CONTAINER_SSH_DIR}"
- "/etc/localtime:/etc/localtime:ro"
links:
- mariadb
aprilandtrey:
image: ghost:${GHOST_VERSION}
container_name: aprilandtrey
environment:
database__client: ${APRILANDTREY_GHOST_DATABASE_CLIENT}
database__connection__host: ${APRILANDTREY_GHOST_DATABASE_HOST}
database__connection__user: ${APRILANDTREY_GHOST_DATABASE_USER}
database__connection__password: ${APRILANDTREY_GHOST_DATABASE_PASS}
database__connection__database: ${APRILANDTREY_GHOST_DATABASE}
url: ${APRILANDTREY_GHOST_URL}
restart: unless-stopped
depends_on:
- mysql
networks:
- deltachunk-int
ports:
- "${APRILANDTREY_GHOST_CONTAINER_PORT}"
links:
- mysql
volumes:
- "${APRILANDTREY_GHOST_HOST_DIR}:${APRILANDTREY_GHOST_CONTAINER_DIR}"
eldon:
image: ghost:${GHOST_VERSION}
container_name: eldon
environment:
database__client: ${ELDON_GHOST_DATABASE_CLIENT}
database__connection__host: ${ELDON_GHOST_DATABASE_HOST}
database__connection__user: ${ELDON_GHOST_DATABASE_USER}
database__connection__password: ${ELDON_GHOST_DATABASE_PASS}
database__connection__database: ${ELDON_GHOST_DATABASE}
url: ${ELDON_GHOST_URL}
restart: unless-stopped
depends_on:
- mysql
networks:
- deltachunk-int
ports:
- "${ELDON_GHOST_CONTAINER_PORT}"
links:
- mysql
volumes:
- "${ELDON_GHOST_CONTAINER_DIR}/.snapshots/"
- "${ELDON_GHOST_HOST_DIR}:${ELDON_GHOST_CONTAINER_DIR}"
commento_aprilandtrey:
image: caroga/commentoplusplus:${COMMENTO_VERSION}
container_name: commento_aprilandtrey
restart: unless-stopped
ports:
- "${APRILANDTREY_COMMENTO_CONTAINER_PORT}"
environment:
COMMENTO_ORIGIN: "${APRILANDTREY_COMMENTO_ORIGIN}"
COMMENTO_PORT: "${APRILANDTREY_COMMENTO_CONTAINER_PORT}"
COMMENTO_POSTGRES: "${APRILANDTREY_COMMENTO_URL}"
COMMENTO_SMTP_HOST: "${GMAIL_HOST}"
COMMENTO_SMTP_USERNAME: "${GMAIL_USER}"
COMMENTO_SMTP_PORT: "${GMAIL_PORT}"
COMMENTO_SMTP_PASSWORD: "${GMAIL_PASS}"
COMMENTO_SMTP_FROM_ADDRESS: "noreply@aprilandtrey.us"
COMMENTO_FORBID_NEW_OWNERS: "true"
COMMENTO_AKISMET_KEY: "${COMMENTO_AKISMET_API_KEY}"
networks:
- deltachunk-int
depends_on:
- postgresdb
commento_eldon:
image: caroga/commentoplusplus:${COMMENTO_VERSION}
container_name: commento_eldon
restart: unless-stopped
ports:
- "${ELDON_COMMENTO_CONTAINER_PORT}"
environment:
COMMENTO_ORIGIN: "${ELDON_COMMENTO_ORIGIN}"
COMMENTO_PORT: "${ELDON_COMMENTO_CONTAINER_PORT}"
COMMENTO_POSTGRES: "${ELDON_COMMENTO_URL}"
COMMENTO_SMTP_HOST: "${GMAIL_HOST}"
COMMENTO_SMTP_USERNAME: "${GMAIL_USER}"
COMMENTO_SMTP_PORT: "${GMAIL_PORT}"
COMMENTO_SMTP_PASSWORD: "${GMAIL_PASS}"
COMMENTO_SMTP_FROM_ADDRESS: "noreply@eldon.me"
COMMENTO_FORBID_NEW_OWNERS: "true"
COMMENTO_AKISMET_KEY: "${COMMENTO_AKISMET_API_KEY}"
networks:
- deltachunk-int
depends_on:
- postgresdb
mariadb:
image: mariadb:${MARIADB_VERSION}
container_name: mariadb
restart: unless-stopped
networks:
- deltachunk-int
environment:
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
ports:
- "${MARIADB_CONTAINER_PORT}"
volumes:
- "${MARIADB_CONTAINER_DATA_DIR}/.snapshots/"
- "${MARIADB_HOST_DATA_DIR}:${MARIADB_CONTAINER_DATA_DIR}"
- "${MARIADB_HOST_LOG_DIR}:${MARIADB_CONTAINER_LOG_DIR}"
- "${MARIADB_HOST_CONF}:${MARIADB_CONTAINER_CONF}:ro"
- "${MARIADB_HOST_INIT}:${MARIADB_CONTAINER_INIT}:ro"
mysql:
image: mysql:${MYSQLDB_VERSION}
container_name: mysql
restart: unless-stopped
environment:
- MYSQL_USER=${MYSQL_USER}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
networks:
- deltachunk-int
ports:
- "${MYSQLDB_CONTAINER_PORT}"
volumes:
- "${MYSQLDB_CONTAINER_DATA_DIR}/.snapshots/"
- "${MYSQLDB_HOST_DATA_DIR}:${MYSQLDB_CONTAINER_DATA_DIR}"
- "${MYSQLDB_HOST_LOG_DIR}:${MYSQLDB_CONTAINER_LOG_DIR}"
- "${MYSQLDB_HOST_CONF}:${MYSQLDB_CONTAINER_CONF}:ro"
- "${MYSQLDB_HOST_INIT}:${MYSQLDB_CONTAINER_INIT}:ro"
postgresdb:
image: postgres:${POSTGRES_VERSION}
container_name: postgresdb
restart: unless-stopped
shm_size: "256MB"
networks:
- deltachunk-int
environment:
POSTGRES_PASSWORD: "${POSTGRES_PASS}"
POSTGRES_USER: "${POSTGRES_USER}"
PGDATA: "${POSTGRES_CONTAINER_DIR}"
ports:
- "${POSTGRES_CONTAINER_PORT}"
volumes:
- "${POSTGRES_HOST_DIR}:${POSTGRES_CONTAINER_DIR}"
- "${POSTGRES_HOST_INIT}:${POSTGRES_CONTAINER_INIT}:ro"
- "${POSTGRES_HOST_ETC}:${POSTGRES_CONTAINER_ETC}:ro"
- "${POSTGRES_PASSWD}:${POSTGRES_CONTAINER_PASSWD}:ro"