Use more configs from env, improved docker setup

main
Igor Scheller 4 years ago
parent 620c9a02bb
commit efddc102d1

@ -1,4 +1,16 @@
**/docker-compose.yml
**/Dockerfile
docker/deployment.env
# Docker config
docker/
!docker/nginx/entrypoint.sh
!docker/nginx/nginx.conf
# Configuration
config/config.php
# Files
.dockerignore
*.git*
.editorconfig
deployment.tpl.yaml
storage/cache/
!storage/cache/.gitignore
!storage/cache/views/.gitignore

2
.gitignore vendored

@ -20,7 +20,9 @@ _vimrc_local.vim
# Docker .env files
/docker/.env
/docker/deployment.env
/docker/dev/.env
/docker/dev/deployment.env
# Project files
/config/config.php

@ -94,20 +94,20 @@ return [
'registration_enabled' => (bool)env('REGISTRATION_ENABLED', true),
// Only arrived angels can sign up for shifts
'signup_requires_arrival' => false,
'signup_requires_arrival' => (bool)env('SIGNUP_REQUIRES_ARRIVAL', false),
// Whether newly-registered user should automatically be marked as arrived
'autoarrive' => (bool)env('ANGEL_AUTOARRIVE', false),
// Only allow shift signup this number of hours in advance
// Setting this to 0 disables the feature
'signup_advance_hours' => 0,
'signup_advance_hours' => env('SIGNUP_ADVANCE_HOURS', 0),
// Allow signup this many minutes after the start of the shift
'signup_post_minutes' => 0,
'signup_post_minutes' => env('SIGNUP_POST_MINUTES', 0),
// Number of hours that an angel has to sign out own shifts
'last_unsubscribe' => 3,
'last_unsubscribe' => env('LAST_UNSUBSCRIBE', 3),
// Define the algorithm to use for `password_verify()`
// If the user uses an old algorithm the password will be converted to the new format
@ -118,41 +118,41 @@ return [
'min_password_length' => env('PASSWORD_MINIMUM_LENGTH', 8),
// Whether the DECT field should be enabled
'enable_dect' => (bool)env('REGISTRATION_ENABLE_DECT', true),
'enable_dect' => (bool)env('ENABLE_DECT', true),
// Enables prename and lastname
'enable_user_name' => (bool)env('REGISTRATION_ENABLE_USERNAME', false),
'enable_user_name' => (bool)env('ENABLE_USER_NAME', false),
// Enable displaying the pronoun fields
'enable_pronoun' => (bool)env('REGISTRATION_ENABLE_DECT', false),
'enable_pronoun' => (bool)env('ENABLE_PRONOUN', false),
// Enables the planned arrival/leave date
'enable_planned_arrival' => (bool)env('REGISTRATION_ENABLE_PLANNED_ARRIVAL', true),
'enable_planned_arrival' => (bool)env('ENABLE_PLANNED_ARRIVAL', true),
// Enables the T-Shirt configuration on signup and profile
'enable_tshirt_size' => (bool)env('REGISTRATION_ENABLE_TSHIRT', true),
'enable_tshirt_size' => (bool)env('ENABLE_TSHIRT_SIZE', true),
// Number of shifts to freeload until angel is locked for shift signup.
'max_freeloadable_shifts' => 2,
'max_freeloadable_shifts' => env('MAX_FREELOADABLE_SHIFTS', 2),
// Local timezone
'timezone' => env('TIMEZONE', ini_get('date.timezone') ?: 'Europe/Berlin'),
// Multiply 'night shifts' and freeloaded shifts (start or end between 2 and 6 exclusive) by 2
'night_shifts' => [
'enabled' => true, // Disable to weigh every shift the same
'start' => 2,
'end' => 6,
'multiplier' => 2,
'enabled' => (bool)env('NIGHT_SHIFTS', true), // Disable to weigh every shift the same
'start' => env('NIGHT_SHIFTS_START', 2),
'end' => env('NIGHT_SHIFTS_END', 6),
'multiplier' => env('NIGHT_SHIFTS_MULTIPLIER', 2),
],
// Voucher calculation
'voucher_settings' => [
'initial_vouchers' => 0,
'shifts_per_voucher' => 0,
'hours_per_voucher' => 2,
'initial_vouchers' => env('INITIAL_VOUCHERS', 0),
'shifts_per_voucher' => env('SHIFTS_PER_VOUCHER', 0),
'hours_per_voucher' => env('HOURS_PER_VOUCHER', 2),
// 'Y-m-d' formatted
'voucher_start' => null,
'voucher_start' => env('VOUCHER_START', null) ?: null,
],
// Available locales in /resources/lang/
@ -187,7 +187,8 @@ return [
// Shifts overview
// Set max number of hours that can be shown at once
'filter_max_duration' => 0,
// 0 means no limit
'filter_max_duration' => env('FILTER_MAX_DURATION', 0),
// Session config
'session' => [
@ -195,7 +196,7 @@ return [
'driver' => env('SESSION_DRIVER', 'pdo'),
// Cookie name
'name' => 'session',
'name' => env('SESSION_NAME', 'session'),
],
// IP addresses of reverse proxies that are trusted, can be an array or a comma separated list

@ -25,8 +25,7 @@ COPY --from=translation /data/ /app/resources/lang
COPY --from=composer /app/vendor/ /app/vendor
COPY --from=composer /app/composer.lock /app/
RUN find /app/storage/ -type f -not -name .gitignore -exec rm {} \;
RUN rm -f /app/config/config.php
RUN find /app/storage/ -type f -not -name VERSION -exec rm {} \;
# Build the PHP container
FROM php:7-fpm-alpine

@ -1,23 +1 @@
# MAINTENANCE=false
# APP_NAME="Engelsystem"
# ENVIRONMENT= 'production'
# APP_URL=null
# FAQ_URL='https://events.ccc.de/congress/2013/wiki/Static:Volunteers'
# MAIL_DRIVER='mail'
# MAIL_FROM_ADDRESS='noreply@engelsystem.de'
# MAIL_FROM_NAME=Engelsystem
# MAIL_HOST='localhost'
# MAIL_PORT=587
# THEME=1
# HOME_SITE='news'
# DISPLAY_NEWS=10
# REGISTRATION_ENABLED=true
# PASSWORD_MINIMUM_LENGTH=8
# REGISTRATION_ENABLE_DECT=true
# REGISTRATION_ENABLE_USERNAME=false
# REGISTRATION_ENABLE_DECT=false
# REGISTRATION_ENABLE_PLANNED_ARRIVAL=true
# REGISTRATION_ENABLE_TSHIRT=true
# TIMEZONE='Europe/Berlin'
# DEFAULT_LOCALE='en_US'
# ADD_HEADERS=true
# Additional env config can be added here

@ -0,0 +1 @@
# Additional env config can be added here

@ -33,6 +33,7 @@ services:
ENVIRONMENT: development
MAIL_DRIVER: log
APP_NAME: Engelsystem DEV
env_file: deployment.env
networks:
- database
- fpm

@ -23,8 +23,6 @@ services:
MYSQL_USER: engelsystem
MYSQL_PASSWORD: engelsystem
MYSQL_DATABASE: engelsystem
# some optional env vars and their defaults can be seen in the env file
# for exact information have a look at config/config.default.php
env_file: deployment.env
networks:
- database

Loading…
Cancel
Save