mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-16 17:54:06 +00:00
Production docker improvements (#463)
* Update production dockerfiles for testing * Add bash, nano and remove unecessary sqlite3 alpine package
This commit is contained in:
committed by
GitHub
parent
3e96297699
commit
770da45dbf
@@ -5,7 +5,7 @@ FROM --platform=$BUILDPLATFORM node:20 AS static_builder
|
||||
|
||||
FROM serversideup/php:8.3-fpm-nginx-alpine AS base
|
||||
USER root
|
||||
RUN apk add --no-cache sqlite
|
||||
RUN apk add --no-cache bash nano
|
||||
RUN install-php-extensions exif
|
||||
RUN install-php-extensions pgsql
|
||||
RUN install-php-extensions sqlite3
|
||||
|
||||
@@ -25,23 +25,16 @@ services:
|
||||
retries: 10
|
||||
|
||||
webapp:
|
||||
container_name: invoiceshelf-app
|
||||
container_name: invoiceshelf-variant-mariadb
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: docker/production/Dockerfile
|
||||
ports:
|
||||
- 90:8080
|
||||
volumes:
|
||||
- invoiceshelf_storage:/var/www/html/storage/
|
||||
networks:
|
||||
- invoiceshelf
|
||||
environment:
|
||||
- CONTAINERIZED=true
|
||||
- APP_NAME=Laravel
|
||||
- APP_ENV=local
|
||||
- APP_DEBUG=true
|
||||
- APP_URL=http://localhost:90
|
||||
- DB_CONNECTION=mysql
|
||||
- APP_URL=http://localhost:8090
|
||||
- DB_CONNECTION=mariadb
|
||||
- DB_HOST=database
|
||||
- DB_PORT=3306
|
||||
- DB_DATABASE=invoiceshelf
|
||||
@@ -50,12 +43,9 @@ services:
|
||||
- DB_PASSWORD_FILE=
|
||||
- CACHE_STORE=file
|
||||
- SESSION_DRIVER=file
|
||||
- SESSION_LIFETIME=120
|
||||
- SESSION_ENCRYPT=false
|
||||
- SESSION_PATH=/
|
||||
- SESSION_LIFETIME=240
|
||||
- SESSION_DOMAIN=localhost
|
||||
- SANCTUM_STATEFUL_DOMAINS=localhost:90
|
||||
- STARTUP_DELAY=
|
||||
- SANCTUM_STATEFUL_DOMAINS=localhost:8090
|
||||
#- MAIL_MAILER=smtp
|
||||
#- MAIL_HOST=smtp.mailtrap.io
|
||||
#- MAIL_PORT=2525
|
||||
@@ -63,6 +53,12 @@ services:
|
||||
#- 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
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
services:
|
||||
webapp:
|
||||
container_name: invoiceshelf-sqlite
|
||||
container_name: invoiceshelf-variant-sqlite
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: docker/production/Dockerfile
|
||||
|
||||
@@ -28,7 +28,7 @@ if [ "$DB_CONNECTION" = "sqlite" ] || [ -z "$DB_CONNECTION" ]; then
|
||||
if [ ! -e "$DB_DATABASE" ]; then
|
||||
echo "**** Specified sqlite database doesn't exist. Creating it ****"
|
||||
echo "**** Please make sure your database is on a persistent volume ****"
|
||||
sqlite3 "$DB_DATABASE" "VACUUM;"
|
||||
cp /var/wwwp/html/database/stubs/sqlite.empty.db "$DB_DATABASE"
|
||||
fi
|
||||
chown www-data:www-data "$DB_DATABASE"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user