69 lines
2.4 KiB
YAML
69 lines
2.4 KiB
YAML
version: '3.7'
|
|
|
|
services:
|
|
littlelink-custom:
|
|
container_name: littlelink-custom
|
|
hostname: littlelink-custom
|
|
entrypoint: "/bin/sh"
|
|
command:
|
|
- -c
|
|
- |
|
|
cp -n -r /htdocs/database/ /data/database
|
|
cp -n /htdocs/.env /data/.env
|
|
cp -n -r /htdocs/littlelink/images /data/images
|
|
cp -n -r /htdocs/themes /data/themes
|
|
cp -n -r /htdocs/img /data/img
|
|
chown -R apache:apache /data
|
|
rm -rf /htdocs/database/
|
|
rm /htdocs/.env
|
|
rm -rf /htdocs/littlelink/images
|
|
rm -rf /htdocs/themes
|
|
rm -rf /htdocs/img
|
|
|
|
sed -i 's/FORCE_HTTPS=false/FORCE_HTTPS=true/g' /data/.env
|
|
|
|
# uncomment this after first start
|
|
# to prevent the installing dialog coming up
|
|
# if the container is recreated
|
|
# rm /htdocs/INSTALLING
|
|
ln -s /data/database /htdocs/database
|
|
ln -s /data/.env /htdocs/.env
|
|
ln -s /data/images /htdocs/littlelink/images
|
|
ln -s /data/themes /htdocs/themes
|
|
ln -s /data/img/ /htdocs/img
|
|
cd /htdocs
|
|
php artisan migrate --force
|
|
exec /usr/local/bin/docker-entrypoint.sh server
|
|
image: 'julianprieber/littlelink-custom:latest'
|
|
environment:
|
|
- TZ=${TZ}
|
|
- SERVER_ADMIN=${LITTLELINK_CUSTOM_EMAIL}
|
|
- HTTP_SERVER_NAME=${APP_DOMAIN}
|
|
- HTTPS_SERVER_NAME=${APP_DOMAIN}
|
|
- LOG_LEVEL=info
|
|
- PHP_MEMORY_LIMIT=256M
|
|
- UPLOAD_MAX_FILESIZE=8M
|
|
- DB_CONNECTION=sqlite
|
|
- FORCE_HTTPS=true
|
|
volumes:
|
|
- '${APP_DATA_DIR}/data/littlelink/data:/data'
|
|
ports:
|
|
- 8184:80
|
|
- '${APP_PORT}:443'
|
|
restart: unless-stopped
|
|
networks:
|
|
- tipi_main_network
|
|
labels:
|
|
traefik.enable: ${APP_EXPOSED}
|
|
traefik.http.routers.littlelink-custom.rule: Host(`${APP_DOMAIN}`)
|
|
traefik.http.routers.littlelink-custom.entrypoints: websecure
|
|
traefik.http.routers.littlelink-custom.service: littlelink-custom
|
|
traefik.http.routers.littlelink-custom.tls.certresolver: myresolver
|
|
traefik.http.routers.littlelink-custom.tls: "true"
|
|
traefik.http.services.littlelink-custom.loadbalancer.server.port: 80
|
|
#traefik.http.services.littlelink-custom.loadbalancer.server.scheme: https
|
|
traefik.http.routers.littlelink-custom.middlewares: littlelink-custom-https-header
|
|
traefik.http.middlewares.littlelink-custom-https-header.headers.customrequestheaders.X-Forwarded-Proto: https
|
|
|
|
|