Files
InvoiceShelf/docker/production/docker-compose.mysql.yml
Darko Gjorgjijoski 770da45dbf Production docker improvements (#463)
* Update production dockerfiles for testing

* Add bash, nano and remove unecessary sqlite3 alpine package
2025-09-02 03:27:26 +02:00

72 lines
1.8 KiB
YAML

#-------------------------------------------
# InvoiceShelf MySQL docker-compose variant
# Repo : https://github.com/InvoiceShelf/docker
#-------------------------------------------
services:
database:
container_name: invoiceshelf-mysql
image: mariadb:10
environment:
- MYSQL_DATABASE=invoiceshelf
- MYSQL_USER=invoiceshelf
- MYSQL_PASSWORD=somepass
- MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=true
expose:
- 3306
volumes:
- invoiceshelf_mysql:/var/lib/mysql
networks:
- invoiceshelf
restart: unless-stopped
healthcheck:
test: ["CMD", "mariadb-admin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
webapp:
container_name: invoiceshelf-variant-mariadb
build:
context: ../../
dockerfile: docker/production/Dockerfile
environment:
- APP_NAME=Laravel
- APP_ENV=local
- APP_DEBUG=true
- APP_URL=http://localhost:8090
- DB_CONNECTION=mariadb
- DB_HOST=database
- DB_PORT=3306
- DB_DATABASE=invoiceshelf
- DB_USERNAME=invoiceshelf
- DB_PASSWORD=somepass
- DB_PASSWORD_FILE=
- CACHE_STORE=file
- SESSION_DRIVER=file
- SESSION_LIFETIME=240
- SESSION_DOMAIN=localhost
- SANCTUM_STATEFUL_DOMAINS=localhost:8090
#- MAIL_MAILER=smtp
#- MAIL_HOST=smtp.mailtrap.io
#- MAIL_PORT=2525
#- MAIL_USERNAME=null
#- MAIL_PASSWORD=null
#- MAIL_PASSWORD_FILE=<filename>
#- MAIL_ENCRYPTION=null
volumes:
- invoiceshelf_storage:/var/www/html/storage/
ports:
- "8090:8080" # 8090 is the public port.
networks:
- invoiceshelf
restart: unless-stopped
depends_on:
- database
networks:
invoiceshelf:
volumes:
invoiceshelf_mysql:
invoiceshelf_storage: