feat(docker): prod, dev .env files

This commit is contained in:
Michael 2025-06-25 17:36:58 +02:00
parent 53dbbb8956
commit c7dad66bfc
4 changed files with 20 additions and 26 deletions

View file

@ -391,16 +391,15 @@ USER $sintonia_user
WORKDIR /var/www/sintonia_webapp
#RUN php artisan ziggy:generate && mv ziggy.js resources/utils/ziggy.js
#RUN cp $HOME/.env ./
ENV sintonia_user=${sintonia_user}
### Start server
CMD cron && \
php artisan key:generate && \
git config --global --add safe.directory /var/www/sintonia_webapp && \
/home/$sintonia_user/composer install --no-progress --no-interaction --no-autoloader && \
/home/$sintonia_user/composer install --no-progress --no-interaction && \
/home/$sintonia_user/composer --no-cache dump-autoload --no-interaction && \
php artisan migrate && \
php artisan key:generate && \
php artisan db:seed RolesAndPermissionsSeeder && \
php artisan schedule:run >> /dev/null 2>&1 && \
set -eux && \
@ -421,10 +420,10 @@ USER $sintonia_user
ENV sintonia_user=${sintonia_user}
WORKDIR /var/www/sintonia_webapp
RUN git clone --branch dev --single-branch https://git.congegni.net/Congegni/sintonia_webapp .
RUN git clone --branch main --single-branch https://git.congegni.net/Congegni/sintonia_webapp .
CMD git pull && \
/home/$sintonia_user/composer install --no-progress --no-interaction && \
/home/$sintonia_user/composer install --no-progress --no-interaction --no-dev && \
/home/$sintonia_user/composer --no-cache dump-autoload --no-interaction && \
npm i && \
npm run build && \

View file

@ -1,9 +1,10 @@
APP_NAME=Sintonia
APP_ENV=local
APP_KEY=base64:vxFbOz6qPvNW2RpEFw/XOWdZ9+X5oXwqnUgjHETJHQM=
APP_KEY=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://127.0.0.1
APP_URL=http://127.0.0.1:9876
SANCTUM_STATEFUL_DOMAINS=http://127.0.0.1
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
@ -13,7 +14,6 @@ APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database
HASH_VERIFY=false
TELESCOPE_ENABLED=true
PHP_CLI_SERVER_WORKERS=4
BCRYPT_ROUNDS=12
@ -38,7 +38,6 @@ SESSION_DOMAIN=127.0.0.1
BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database
CACHE_STORE=database
CACHE_PREFIX=
@ -65,4 +64,13 @@ AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
VITE_APP_NAME="${APP_NAME}"
VITE_APP_NAME="${APP_NAME}"
QUEUE_CONNECTION=rabbitmq
RABBITMQ_HOST=rabbitmq
RABBITMQ_PORT=5672
RABBITMQ_VHOST=/libretime
RABBITMQ_LOGIN=libretime
RABBITMQ_PASSWORD=libretime
VITE_APP_TIMEZONE=UTC

View file

@ -77,6 +77,7 @@ services:
container_name: sintonia-webapp-dev
working_dir: /var/www/sintonia_webapp
volumes:
- ./dev/sintonia-webapp/laravel/.env.dev:/var/www/sintonia_webapp/.env
- ./sintonia_webapp:/var/www/sintonia_webapp
- libretime_storage:/srv/libretime
ports:

View file

@ -114,25 +114,11 @@ services:
init: true
working_dir: /var/www/sintonia_webapp
volumes:
- ./docker/sintonia-webapp/laravel/.env.production:/var/www/sintonia_webapp/.env
- ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
- libretime_storage:/srv/libretime
- libretime_assets:/var/www/html
- sintonia_assets:/var/www/sintonia_webapp
- ${SINTONIA_CONFIG_FILEPATH:-./.env.production}:/var/www/sintonia_webapp/.env
# environment:
# APP_NAME: ${SINTONIA_APP_NAME:-libretime}
# APP_URL: ${SINTONIA_APP_URL:-127.0.0.1:9876}
# DB_CONNECTION: ${SINTONIA_DB_CONNECTION:-pgsql}
# DB_HOST: ${SINTONIA_DB_HOST:-postgres}
# DB_PORT: ${SINTONIA_DB_PORT:-5432}
# DB_DATABASE: ${SINTONIA_DB_DATABASE:-libretime}
# DB_USERNAME: ${SINTONIA_DB_USERNAME:-libretime}
# DB_PASSWORD: ${SINTONIA_DB_PASSWORD:-libretime}
# RABBITMQ_HOST: ${SINTONIA_RABBITMQ_HOST:-rabbitmq}
# RABBITMQ_PORT: ${SINTONIA_RABBITMQ_PORT:-5672}
# RABBITMQ_VHOST: ${SINTONIA_RABBITMQ_VHOST:-/libretime}
# RABBITMQ_LOGIN: ${SINTONIA_RABBITMQ_LOGIN:-libretime}
# RABBITMQ_PASSWORD: ${SINTONIA_RABBITMQ_PASSWORD:-libretime}
nginx:
image: nginx