73 lines
2.9 KiB
YAML
73 lines
2.9 KiB
YAML
|
version: '3.7'
|
||
|
|
||
|
services:
|
||
|
linkstack:
|
||
|
container_name: linkstack
|
||
|
hostname: linkstack
|
||
|
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: linkstackorg/linkstack:latest
|
||
|
environment:
|
||
|
- TZ=${TZ}
|
||
|
- SERVER_ADMIN=${LINKSTACK_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/linkstack:/data'
|
||
|
ports:
|
||
|
- 8184:80
|
||
|
- '${APP_PORT}:443'
|
||
|
restart: unless-stopped
|
||
|
networks:
|
||
|
- tipi_main_network
|
||
|
labels:
|
||
|
traefik.enable: ${APP_EXPOSED}
|
||
|
traefik.http.routers.linkstack.rule: Host(`${APP_DOMAIN}`)
|
||
|
traefik.http.routers.linkstack.entrypoints: websecure
|
||
|
traefik.http.routers.linkstack.service: linkstack
|
||
|
traefik.http.routers.linkstack.tls.certresolver: myresolver
|
||
|
traefik.http.routers.linkstack.tls: "true"
|
||
|
traefik.http.services.linkstack.loadbalancer.server.port: 80
|
||
|
traefik.http.routers.linkstack.middlewares: "linkstack-security-headers,linkstack-forwarded-headers"
|
||
|
traefik.http.middlewares.linkstack-security-headers.headers.contentSecurityPolicy: "upgrade-insecure-requests"
|
||
|
traefik.http.middlewares.linkstack-forwarded-headers.headers.customrequestheaders.X-Real-IP: "$remote_addr"
|
||
|
traefik.http.middlewares.linkstack-forwarded-headers.headers.customrequestheaders.X-Forwarded-For: "$proxy_add_x_forwarded_for"
|
||
|
traefik.http.middlewares.linkstack-forwarded-headers.headers.customrequestheaders.X-Forwarded-Proto: "https"
|
||
|
traefik.http.middlewares.linkstack-forwarded-headers.headers.customrequestheaders.X-VerifiedViaNginx: "yes"
|
||
|
traefik.http.middlewares.linkstack-forwarded-headers.headers.customrequestheaders.Upgrade: "$http_upgrade"
|
||
|
traefik.http.middlewares.linkstack-forwarded-headers.headers.customrequestheaders.Connection: "upgrade"
|
||
|
|