Example docker-compose.yml
services:
yourls:
container_name: yourls
image: yourls
restart: unless-stopped
environment:
YOURLS_DB_HOST: mysql-yourls
YOURLS_DB_NAME: yourls
YOURLS_DB_PASS: very-secure
YOURLS_SITE: https://yourls.example.com
YOURLS_USER: yourls-serverus
YOURLS_PASS: very-secure
mysql-yourls:
container_name: mysql-yourls
image: mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: very-secure
MYSQL_DATABASE: yourls
It’s important to remember that the service is available under example.com/admin and not under example.com/