Skip to content

Instantly share code, notes, and snippets.

@dudefoxlive
Last active July 30, 2024 14:46
Show Gist options
  • Save dudefoxlive/aad51aaf4503d35bcd7ea231e0380139 to your computer and use it in GitHub Desktop.
Save dudefoxlive/aad51aaf4503d35bcd7ea231e0380139 to your computer and use it in GitHub Desktop.
---
version: "3.8"
services:
shlink:
image: shlinkio/shlink:stable
restart: unless-stopped
environment:
# Set timezone according to where you live
- TZ="US/Eastern"
# Set the domain that you will be using. (example: link.contoso.com)
- DEFAULT_DOMAIN=l.contoso.com
# Set to true or false. Its recommended to have HTTPS
- IS_HTTPS_ENABLED=true
# This is Database informationm
# Put what Database you will be using. Options are mysql, maria, postgres, mssql, and sqlite (default)
- DB_DRIVER=maria
# This is the user for the database
- DB_USER=shlink
# This is the name of the database to be used
- DB_NAME=shlink
# This is the password for the user of the database. This is NOT the root password for the database
- DB_PASSWORD=<DB_PASSWORD>
# This is the database hostname
- DB_HOST=database
depends_on:
- database
ports:
# Adjust ports to something that is not in use
- 8080:8080
links:
- database
database:
image: mariadb:11
restart: unless-stopped
environment:
# This is the root password for the database. DO NOT USE THIS FOR THE PASSWORD FOR THE DATABASE USER
- MARIADB_ROOT_PASSWORD=<MARIADB_ROOT_PASSWORD>
# This is the database name
- MARIADB_DATABASE=shlink
# This is the database user that shlink will use
- MARIADB_USER=shlink
# This is the password for the database user
- MARIADB_PASSWORD=<DB_PASSWORD>
volumes:
# Make sure to mount this to a folder to save your database upon updating the container
- /path/to/config/shlink/db_data:/var/lib/mysql
shlink-web-client:
image: shlinkio/shlink-web-client
restart: unless-stopped
volumes:
# Create the file first or the file will be created as a folder.
# Nothing has to be in the file. You can add your server after
# the container is created and up and running.
- /path/to/config/shlink/servers.json:/usr/share/nginx/html/servers.json
ports:
- 8081:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment