Add user info and move files around

This commit is contained in:
aditya.chandel
2025-03-11 19:28:47 -06:00
parent 9abdde2602
commit aabdc3f1fd
4 changed files with 30 additions and 14 deletions

28
example-docker/.env Normal file
View File

@@ -0,0 +1,28 @@
# Docker Image Version
# This determines which version of the Booklore image to pull from GitHub Container Registry (GHCR).
# Use "latest" for the most recent version or specify a tag like "v1.0.0".
BOOKLORE_IMAGE_TAG=latest
# User and Timezone Settings
# PUID and PGID define the user/group running the container.
# TZ sets the timezone for correct time-related operations.
PUID=1000 # Default user ID (Check with `id -u` on Linux/Mac)
PGID=1000 # Default group ID (Check with `id -g` on Linux/Mac)
TZ=Etc/UTC # Change this to your timezone (e.g., America/New_York, Asia/Kolkata)
# Database Credentials (Replace with a secure password)
# This password is used by MariaDB. Make sure to keep it secure.
MYSQL_ROOT_PASSWORD=your_secure_password
# Paths for Docker Volumes (Update these paths as per your system)
# These paths store persistent data for Booklore and MariaDB.
# Replace "/path/to/..." with actual directories on your system.
BOOKLORE_DATA_PATH=/path/to/booklore/data # Example: /home/user/booklore/data (Stores app-related data)
BOOKLORE_BOOKS_PATH=/path/to/booklore/books # Example: /home/user/booklore/books (Stores book files)
MARIADB_CONFIG_PATH=/path/to/mariadb/config # Example: /home/user/booklore/mariadb/config (Stores database config)
# How to find your correct paths?
# 1. Choose a location where you want to store persistent data.
# 2. Create the required folders if they dont exist.
# 3. Use `pwd` in your terminal inside those directories to get the full path.
# 4. Replace `/path/to/...` above with your actual paths.

View File

@@ -0,0 +1,23 @@
version: '3.8'
services:
booklore:
image: ghcr.io/adityachandelgit/booklore-app:${BOOKLORE_IMAGE_TAG}
container_name: booklore
env_file:
- .env
depends_on:
- mariadb
ports:
- "6060:6060"
volumes:
- ${BOOKLORE_DATA_PATH}:/app/data
- ${BOOKLORE_BOOKS_PATH}:/books
mariadb:
image: lscr.io/linuxserver/mariadb:11.4.5
container_name: mariadb
env_file:
- .env
volumes:
- ${MARIADB_CONFIG_PATH}:/config
restart: unless-stopped