-
-
Save luckman212/40ff0a827c12007c8c79ff275d390767 to your computer and use it in GitHub Desktop.
docker-compose config for speedtest-tracker + MariaDB on Synology
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place in same dir as compose.yml, adjust as needed for your environment | |
# create a limited user and run `id <username>` to get the PUID/PGID values | |
TZ=America/New_York | |
CNAME=speedtest | |
DOCKER_DIR=/volume1/docker | |
PUID=1030 | |
PGID=100 | |
MARIADB_DATABASE=speedtest-tracker | |
MARIADB_USER=speedy | |
MARIADB_PASSWORD=password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change 'prod' network to whatever your actual network name is! | |
# make sure to create and adjust the .env file below as well | |
version: '3.3' | |
services: | |
speedtest-tracker: | |
image: 'ghcr.io/alexjustesen/speedtest-tracker:latest' | |
container_name: ${CNAME}_cfg | |
restart: unless-stopped | |
depends_on: | |
- db | |
ports: | |
- '8080:80' | |
- '8443:443' | |
networks: | |
- prod | |
environment: | |
- PUID=${PUID} | |
- PGID=${PGID} | |
- DB_CONNECTION=mysql | |
- DB_HOST=${CNAME}_db | |
- DB_PORT=3306 | |
- DB_DATABASE=${MARIADB_DATABASE} | |
- DB_USERNAME=${MARIADB_USER} | |
- DB_PASSWORD=${MARIADB_PASSWORD} | |
- TZ=${TZ} | |
volumes: | |
- type: bind | |
source: /etc/localtime | |
target: /etc/localtime | |
read_only: true | |
bind: | |
create_host_path: true | |
- type: bind | |
source: ${DOCKER_DIR}/${CNAME}/cfg | |
target: /config | |
bind: | |
create_host_path: true #may not work on Synology - if you get errors, create the path manually | |
db: | |
image: mariadb:latest | |
container_name: ${CNAME}_db | |
restart: always | |
networks: | |
- prod | |
environment: | |
- MARIADB_DATABASE=${MARIADB_DATABASE} | |
- MARIADB_USER=${MARIADB_USER} | |
- MARIADB_PASSWORD=${MARIADB_PASSWORD} | |
- MARIADB_RANDOM_ROOT_PASSWORD=true | |
volumes: | |
- type: bind | |
source: ${DOCKER_DIR}/${CNAME}/db | |
target: /var/lib/mysql | |
bind: | |
create_host_path: true | |
networks: | |
prod: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
alexjustesen/speedtest-tracker#695