the_prg_server_configuratio.../nix-system-configs/docker-containers/services/part-db/docker-compose.yml

61 lines
2.6 KiB
YAML

version: '3.3'
services:
partdb:
container_name: partdb
# By default Part-DB will be running under Port 8080, you can change it here
ports:
- '633:80'
volumes:
# By default
- ./uploads:/var/www/html/uploads
- ./public_media:/var/www/html/public/media
- ./db:/var/www/html/var/db
restart: unless-stopped
image: jbtronics/part-db1:latest
labels:
- "traefik.enable=true"
- "traefik.http.routers.myservice.rule=Host(`myservice.YOUR.DOMAIN`)"
- "traefik.http.routers.myservice.entrypoints=websecure"
- "traefik.http.services.myservice.loadbalancer. server.port=80"
depends_on:
- database
environment:
# Replace 4321112sss with the value of MYSQL_PASSWORD from below
- DATABASE_URL=mysql://partdb:4321112sss@database:3306/partdb
# In docker env logs will be redirected to stderr
- APP_ENV=docker
# Uncomment this, if you want to use the automatic database migration feature. With this you do not have to
# run the doctrine:migrations:migrate commands on installation or upgrade. A database backup is written to the uploads/
# folder (under .automigration-backup), so you can restore it, if the migration fails.
# This feature is currently experimental, so use it at your own risk!
- DB_AUTOMIGRATE=true
# You can configure Part-DB using the webUI or environment variables
# However you can add any other environment configuration you want here
# See .env file for all available options or https://docs.part-db.de/configuration.html
# Override value if you want to show a given text on homepage.
# When this is commented out the webUI can be used to configure the banner
#- BANNER=This is a test banner<br>with a line break
# If you need to install additional composer packages (e.g., for specific mailer transports), you can specify them here:
# - COMPOSER_EXTRA_PACKAGES=symfony/mailgun-mailer symfony/sendgrid-mailer
database:
container_name: partdb_database
image: mysql:8.0
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password --log-bin-trust-function-creators=1
environment:
# Change this Password
MYSQL_ROOT_PASSWORD: jijoioajdiojasdas1123
MYSQL_DATABASE: partdb
MYSQL_USER: partdb
MYSQL_PASSWORD: 4321112sss
# Uncomment the following line if you need to access, your MySQL database from outside of docker (e.g. for debugging), normally you should leave that disabled
#ports:
# - '4306:3306'
volumes:
- ./mysql:/var/lib/mysql