mirror of
https://github.com/Haxxnet/Compose-Examples.git
synced 2025-11-23 17:04:27 +01:00
add yourls
This commit is contained in:
9
examples/yourls/README.md
Normal file
9
examples/yourls/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# References
|
||||
|
||||
- https://github.com/YOURLS/YOURLS
|
||||
|
||||
# Notes
|
||||
|
||||
The provided `docker-compose.yml` file bind mounts a custom Apache `security.conf` into the container.
|
||||
|
||||
This ensures that YOURL's Apache web server does not disclose its detailed version information.
|
||||
49
examples/yourls/docker-compose.yml
Normal file
49
examples/yourls/docker-compose.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
|
||||
yourls:
|
||||
image: yourls:latest
|
||||
container_name: yourls
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 8080:80
|
||||
expose:
|
||||
- 80
|
||||
environment:
|
||||
YOURLS_SITE: https://myyourls.example.com # please adjust to your domain
|
||||
YOURLS_USER: yourls-admin # please adjust
|
||||
YOURLS_PASS: very-secury-admin-password # please adjust
|
||||
YOURLS_DB_HOST: mysql
|
||||
YOURLS_DB_USER: yourls
|
||||
YOURLS_DB_NAME: yourls
|
||||
YOURLS_DB_PASS: very-secure-database-password # please adjust
|
||||
volumes:
|
||||
- ./security.conf:/etc/apache2/conf-enabled/security.conf:ro
|
||||
#networks:
|
||||
# - proxy
|
||||
#labels:
|
||||
# - traefik.enable=true
|
||||
# - traefik.http.routers.yourls.rule=Host(`s.ptf.one`)
|
||||
# - traefik.http.services.yourls.loadbalancer.server.port=80
|
||||
# - traefik.docker.network=proxy
|
||||
# # Part for optional traefik middlewares
|
||||
# - traefik.http.routers.CHANGEME.middlewares=local-ipwhitelist@file,authelia@docker
|
||||
|
||||
mysql:
|
||||
image: mysql:latest
|
||||
container_name: yourls-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_DATABASE: yourls
|
||||
MYSQL_USER: yourls
|
||||
MYSQL_PASSWORD: very-secure-database-password # please adjust
|
||||
MYSQL_ROOT_PASSWORD: very-secure-database-root-password # please adjust
|
||||
volumes:
|
||||
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/yourls/mysql:/var/lib/mysql
|
||||
#networks:
|
||||
# - proxy
|
||||
|
||||
#networks:
|
||||
# proxy:
|
||||
# external: true
|
||||
5
examples/yourls/security.conf
Normal file
5
examples/yourls/security.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
# bind mount this file into the yourls container
|
||||
# overwrites '/etc/apache2/conf-enabled/security.conf' to prevent version disclosure
|
||||
|
||||
ServerTokens Prod
|
||||
ServerSignature Off
|
||||
Reference in New Issue
Block a user