mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
sync
This commit is contained in:
parent
9445980e04
commit
284bb26d92
5 changed files with 66 additions and 12 deletions
|
@ -2,8 +2,6 @@
|
||||||
.env
|
.env
|
||||||
.git
|
.git
|
||||||
.gitignore
|
.gitignore
|
||||||
contrib/docker-compose/.env
|
|
||||||
contrib/docker-compose/config
|
|
||||||
contrib/docker-compose/data
|
|
||||||
data
|
|
||||||
docker-compose*.yml
|
docker-compose*.yml
|
||||||
|
|
||||||
|
/docker-compose/
|
||||||
|
|
16
.env.docker
16
.env.docker
|
@ -6,10 +6,10 @@
|
||||||
###############################################################
|
###############################################################
|
||||||
|
|
||||||
# Path (relative to the docker-compose.yml) or absolute (/some/other/path) file where containers will store their data
|
# Path (relative to the docker-compose.yml) or absolute (/some/other/path) file where containers will store their data
|
||||||
DOCKER_DATA_ROOT="./data"
|
DOCKER_DATA_ROOT="./docker-compose/data"
|
||||||
|
|
||||||
# Path (relative to the docker-compose.yml) or absolute (/some/other/path) file where containers will store their confguration
|
# Path (relative to the docker-compose.yml) or absolute (/some/other/path) file where containers will store their confguration
|
||||||
DOCKER_CONFIG_ROOT="./config"
|
DOCKER_CONFIG_ROOT="./docker-compose/config"
|
||||||
|
|
||||||
# Image to pull the Pixelfed Docker images from
|
# Image to pull the Pixelfed Docker images from
|
||||||
#
|
#
|
||||||
|
@ -30,6 +30,12 @@ TZ="UTC"
|
||||||
# Automatically run [artisan migrate --force] if new migrations are detected
|
# Automatically run [artisan migrate --force] if new migrations are detected
|
||||||
DOCKER_APPLY_NEW_MIGRATIONS_AUTOMATICALLY="0"
|
DOCKER_APPLY_NEW_MIGRATIONS_AUTOMATICALLY="0"
|
||||||
|
|
||||||
|
# The e-mail to use for Lets Encrypt certificate requests
|
||||||
|
LETSENCRYPT_EMAIL="__CHANGE_ME__"
|
||||||
|
|
||||||
|
# Lets Encrypt staging/test servers for certificate requests
|
||||||
|
LETSENCRYPT_TEST="true"
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# Pixelfed application configuration
|
# Pixelfed application configuration
|
||||||
###############################################################
|
###############################################################
|
||||||
|
@ -922,3 +928,9 @@ DOCKER_WEB_HTTP_PORT_EXTERNAL="8080"
|
||||||
|
|
||||||
# Port that the web will listen on *outside* the container (e.g. the host machine) for HTTPS traffic
|
# Port that the web will listen on *outside* the container (e.g. the host machine) for HTTPS traffic
|
||||||
DOCKER_WEB_HTTPS_PORT_EXTERNAL="444"
|
DOCKER_WEB_HTTPS_PORT_EXTERNAL="444"
|
||||||
|
|
||||||
|
# Port that the web will listen on *outside* the container (e.g. the host machine) for HTTP traffic
|
||||||
|
DOCKER_PROXY_PORT_EXTERNAL_HTTP="8080"
|
||||||
|
|
||||||
|
# Port that the web will listen on *outside* the container (e.g. the host machine) for HTTPS traffic
|
||||||
|
DOCKER_PROXY_PORT_EXTERNAL_HTTPS="443"
|
||||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -20,6 +20,5 @@ yarn-error.log
|
||||||
.git-credentials
|
.git-credentials
|
||||||
/.composer/
|
/.composer/
|
||||||
/nginx.conf
|
/nginx.conf
|
||||||
/contrib/docker-compose/data
|
/docker-compose/
|
||||||
/contrib/docker-compose/config
|
|
||||||
!/contrib/docker-compose/.env
|
!/contrib/docker-compose/.env
|
||||||
|
|
|
@ -6,6 +6,43 @@ version: "3"
|
||||||
###############################################################
|
###############################################################
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
# HTTP/HTTPS proxy
|
||||||
|
#
|
||||||
|
# See: https://github.com/nginx-proxy/nginx-proxy/tree/main/docs
|
||||||
|
proxy:
|
||||||
|
image: nginxproxy/nginx-proxy:1.4
|
||||||
|
container_name: "${APP_DOMAIN}-proxy"
|
||||||
|
#restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- "/var/run/docker.sock:/tmp/docker.sock:ro"
|
||||||
|
- "${DOCKER_CONFIG_ROOT}/proxy/certs:/etc/nginx/certs"
|
||||||
|
- "${DOCKER_CONFIG_ROOT}/proxy/conf.d:/etc/nginx/conf.d"
|
||||||
|
- "${DOCKER_CONFIG_ROOT}/proxy/html:/usr/share/nginx/html"
|
||||||
|
- "${DOCKER_CONFIG_ROOT}/proxy/vhost.d:/etc/nginx/vhost.d"
|
||||||
|
ports:
|
||||||
|
- "${DOCKER_PROXY_PORT_EXTERNAL_HTTP}:80"
|
||||||
|
- "${DOCKER_PROXY_PORT_EXTERNAL_HTTPS}:443"
|
||||||
|
|
||||||
|
# Proxy companion for managing letsencrypt SSL certificates
|
||||||
|
#
|
||||||
|
# See: https://github.com/nginx-proxy/acme-companion/tree/main/docs
|
||||||
|
proxy-acme:
|
||||||
|
image: nginxproxy/acme-companion
|
||||||
|
container_name: "${APP_DOMAIN}-proxy-acme"
|
||||||
|
#restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
DEFAULT_EMAIL: "${LETSENCRYPT_EMAIL}"
|
||||||
|
LETSENCRYPT_TEST: "${LETSENCRYPT_TEST}"
|
||||||
|
NGINX_PROXY_CONTAINER: "${APP_DOMAIN}-proxy"
|
||||||
|
depends_on:
|
||||||
|
- proxy
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
- "${DOCKER_CONFIG_ROOT}/proxy/certs:/etc/nginx/certs"
|
||||||
|
- "${DOCKER_CONFIG_ROOT}/proxy/conf.d:/etc/nginx/conf.d"
|
||||||
|
- "${DOCKER_CONFIG_ROOT}/proxy/html:/usr/share/nginx/html"
|
||||||
|
- "${DOCKER_CONFIG_ROOT}/proxy/vhost.d:/etc/nginx/vhost.d"
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: "${DOCKER_IMAGE}:${DOCKER_TAG}"
|
image: "${DOCKER_IMAGE}:${DOCKER_TAG}"
|
||||||
# build:
|
# build:
|
||||||
|
@ -15,9 +52,17 @@ services:
|
||||||
- "./.env:/var/www/.env"
|
- "./.env:/var/www/.env"
|
||||||
- "${DOCKER_DATA_ROOT}/pixelfed/cache:/var/www/bootstrap/cache"
|
- "${DOCKER_DATA_ROOT}/pixelfed/cache:/var/www/bootstrap/cache"
|
||||||
- "${DOCKER_DATA_ROOT}/pixelfed/storage:/var/www/storage"
|
- "${DOCKER_DATA_ROOT}/pixelfed/storage:/var/www/storage"
|
||||||
ports:
|
environment:
|
||||||
- "${DOCKER_WEB_HTTP_PORT_EXTERNAL}:80"
|
LETSENCRYPT_HOST: "${APP_DOMAIN},*.${APP_DOMAIN}"
|
||||||
- "${DOCKER_WEB_HTTPS_PORT_EXTERNAL}:443"
|
VIRTUAL_HOST: "${APP_DOMAIN},*.${APP_DOMAIN}"
|
||||||
|
VIRTUAL_PORT: "80"
|
||||||
|
labels:
|
||||||
|
com.github.nginx-proxy.nginx-proxy.keepalive: 30
|
||||||
|
com.github.nginx-proxy.nginx-proxy.http2.enable: true
|
||||||
|
com.github.nginx-proxy.nginx-proxy.http3.enable: true
|
||||||
|
# ports:
|
||||||
|
# - "${DOCKER_WEB_HTTP_PORT_EXTERNAL}:80"
|
||||||
|
# - "${DOCKER_WEB_HTTPS_PORT_EXTERNAL}:443"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
|
|
|
@ -410,7 +410,7 @@ function await-database-ready() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
log-error-and-exit "Unknown database type: [${DB_CONNECT}]"
|
log-error-and-exit "Unknown database type: [${DB_CONNECTION}]"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue