Some experimental docker changes.

This commit is contained in:
James Cole
2019-08-04 08:01:13 +02:00
parent 933f02d1d9
commit d3be043aa7
6 changed files with 83 additions and 99 deletions

View File

@@ -3,8 +3,6 @@
# build image # build image
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
if [ "$TRAVIS_BRANCH" == "develop" ]; then if [ "$TRAVIS_BRANCH" == "develop" ]; then
echo "Build develop amd64" echo "Build develop amd64"
docker build -t jc5x/firefly-iii:develop-amd64 -f Dockerfile.amd64 . docker build -t jc5x/firefly-iii:develop-amd64 -f Dockerfile.amd64 .

View File

@@ -2,7 +2,6 @@
docker run --rm --privileged multiarch/qemu-user-static:register --reset docker run --rm --privileged multiarch/qemu-user-static:register --reset
# get qemu-arm-static binary # get qemu-arm-static binary
mkdir tmp mkdir tmp
pushd tmp && \ pushd tmp && \

View File

@@ -2,8 +2,6 @@
echo "Now in entrypoint.sh for Firefly III" echo "Now in entrypoint.sh for Firefly III"
lscpu
# make sure the correct directories exists (suggested by @chrif): # make sure the correct directories exists (suggested by @chrif):
echo "Making directories..." echo "Making directories..."
mkdir -p $FIREFLY_PATH/storage/app/public mkdir -p $FIREFLY_PATH/storage/app/public
@@ -37,15 +35,12 @@ chmod -R 775 $FIREFLY_PATH/storage
echo "Remove log file..." echo "Remove log file..."
rm -f $FIREFLY_PATH/storage/logs/laravel.log rm -f $FIREFLY_PATH/storage/logs/laravel.log
#echo "Map environment variables on .env file..."
#cat $FIREFLY_PATH/.deploy/docker/.env.docker | envsubst > $FIREFLY_PATH/.env
echo "Dump auto load..." echo "Dump auto load..."
composer dump-autoload composer dump-autoload
echo "Discover packages..." echo "Discover packages..."
php artisan package:discover php artisan package:discover
echo "Run various artisan commands..." echo "Run various artisan commands..."
#. $FIREFLY_PATH/.env
if [[ -z "$DB_PORT" ]]; then if [[ -z "$DB_PORT" ]]; then
if [[ $DB_CONNECTION == "pgsql" ]]; then if [[ $DB_CONNECTION == "pgsql" ]]; then
DB_PORT=5432 DB_PORT=5432

View File

@@ -22,6 +22,7 @@ TZ=Europe/Amsterdam
APP_URL=http://localhost APP_URL=http://localhost
# TRUSTED_PROXIES is a useful variable when using Docker and/or a reverse proxy. # TRUSTED_PROXIES is a useful variable when using Docker and/or a reverse proxy.
# Set it to ** and reverse proxies work just fine.
TRUSTED_PROXIES= TRUSTED_PROXIES=
# The log channel defines where your log entries go to. # The log channel defines where your log entries go to.
@@ -105,6 +106,7 @@ MAPBOX_API_KEY=
# RatesApi.IO (see https://ratesapi.io) is a FREE and OPEN SOURCE live currency exchange rates, # RatesApi.IO (see https://ratesapi.io) is a FREE and OPEN SOURCE live currency exchange rates,
# built compatible with Fixer.IO, based on data published by European Central Bank, and doesn't require API key. # built compatible with Fixer.IO, based on data published by European Central Bank, and doesn't require API key.
CER_PROVIDER=ratesapi CER_PROVIDER=ratesapi
# If you have select "fixer" as default currency exchange rates, # If you have select "fixer" as default currency exchange rates,
# set a Fixer IO API key here (see https://fixer.io) to enable live currency exchange rates. # set a Fixer IO API key here (see https://fixer.io) to enable live currency exchange rates.
# Please note that this WILL ONLY WORK FOR PAID fixer.io accounts because they severely limited # Please note that this WILL ONLY WORK FOR PAID fixer.io accounts because they severely limited

View File

@@ -4,23 +4,14 @@ networks:
driver: bridge driver: bridge
services: services:
firefly_iii_app: firefly_iii_app:
environment: image: jc5x/firefly-iii:develop
- DB_HOST=firefly_iii_db depends_on:
- DB_NAME=firefly
- DB_USER=firefly
- DB_PASSWORD=firefly
- APP_KEY=S0m3R@nd0mStr1ngOf32Ch@rsEx@ctly
- APP_ENV=local
- DB_CONNECTION=pgsql
- TZ=Europe/Amsterdam
- APP_LOG_LEVEL=debug
image: jc5x/firefly-iii
links:
- firefly_iii_db - firefly_iii_db
networks: networks:
- firefly_iii_net - firefly_iii_net
ports: ports:
- "80:80" - "80:80"
env_file: docker-variables.txt
volumes: volumes:
- -
source: firefly_iii_export source: firefly_iii_export
@@ -31,14 +22,14 @@ services:
target: /var/www/firefly-iii/storage/upload target: /var/www/firefly-iii/storage/upload
type: volume type: volume
firefly_iii_db: firefly_iii_db:
environment:
- POSTGRES_PASSWORD=firefly
- POSTGRES_USER=firefly
image: "postgres:10" image: "postgres:10"
environment:
- POSTGRES_PASSWORD=secret_firefly_password
- POSTGRES_USER=firefly
networks: networks:
- firefly_iii_net - firefly_iii_net
volumes: volumes:
- "firefly_iii_db:/var/lib/postgresql/data" - firefly_iii_db:/var/lib/postgresql/data
version: "3.2" version: "3.2"
volumes: volumes:
firefly_iii_db: ~ firefly_iii_db: ~

View File

@@ -1,57 +1,57 @@
# You can leave this on "local". If you change it to production most console commands will ask for extra confirmation. # You can leave this on "local". If you change it to production most console commands will ask for extra confirmation.
# Never set it to "testing". # Never set it to "testing".
APP_ENV=${APP_ENV} APP_ENV=local
# Set to true if you want to see debug information in error screens. # Set to true if you want to see debug information in error screens.
APP_DEBUG=${APP_DEBUG} APP_DEBUG=false
# This should be your email address # This should be your email address
SITE_OWNER=${SITE_OWNER} SITE_OWNER=mail@example.com
# The encryption key for your database and sessions. Keep this very secure. # The encryption key for your sessions. Keep this very secure.
# If you generate a new one all existing data must be considered LOST. # If you generate a new one existing data must be considered LOST.
# Change it to a string of exactly 32 chars or use command `php artisan key:generate` to generate it # Change it to a string of exactly 32 chars or use command `php artisan key:generate` to generate it
APP_KEY=${APP_KEY} APP_KEY=SomeRandomStringOf32CharsExactly
# Change this value to your preferred time zone. # Change this value to your preferred time zone.
# Example: Europe/Amsterdam # Example: Europe/Amsterdam
TZ=${TZ} TZ=Europe/Amsterdam
# This variable must match your installation's external address but keep in mind that # This variable must match your installation's external address but keep in mind that
# it's only used on the command line as a fallback value. # it's only used on the command line as a fallback value.
APP_URL=${APP_URL} APP_URL=http://localhost
# TRUSTED_PROXIES is a useful variable when using Docker and/or a reverse proxy. # TRUSTED_PROXIES is a useful variable when using Docker and/or a reverse proxy.
TRUSTED_PROXIES=${TRUSTED_PROXIES} # Set it to ** and reverse proxies work just fine.
TRUSTED_PROXIES=
# The log channel defines where your log entries go to. # The log channel defines where your log entries go to.
# 'daily' is the default logging mode giving you 5 daily rotated log files in /storage/logs/. # 'daily' is the default logging mode giving you 5 daily rotated log files in /storage/logs/.
# Several other options exist. You can use 'single' for one big fat error log (not recommended). # Several other options exist. You can use 'single' for one big fat error log (not recommended).
# Also available are 'syslog', 'errorlog' and 'stdout' which will log to the system itself. # Also available are 'syslog', 'errorlog' and 'stdout' which will log to the system itself.
LOG_CHANNEL=stdout LOG_CHANNEL=daily
# Log level. You can set this from least severe to most severe: # Log level. You can set this from least severe to most severe:
# debug, info, notice, warning, error, critical, alert, emergency # debug, info, notice, warning, error, critical, alert, emergency
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably # If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
# nothing will get logged, ever. # nothing will get logged, ever.
APP_LOG_LEVEL=${APP_LOG_LEVEL} APP_LOG_LEVEL=notice
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III # Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
# For other database types, please see the FAQ: http://firefly-iii.readthedocs.io/en/latest/support/faq.html # For other database types, please see the FAQ: http://firefly-iii.readthedocs.io/en/latest/support/faq.html
DB_CONNECTION=${DB_CONNECTION} DB_CONNECTION=pgsql
DB_HOST=${DB_HOST} DB_HOST=127.0.0.1
DB_PORT=${DB_PORT} DB_PORT=5432
DB_DATABASE=${DB_NAME} DB_DATABASE=firefly
DB_USERNAME=${DB_USER} DB_USERNAME=firefly
DB_PASSWORD="${DB_PASSWORD}" DB_PASSWORD=secret_firefly_password
# PostgreSQL supports SSL. You can configure it here. # PostgreSQL supports SSL. You can configure it here.
PGSQL_SSL=${PGSQL_SSL} PGSQL_SSL_MODE=prefer
PGSQL_SSL_MODE=${PGSQL_SSL_MODE} PGSQL_SSL_ROOT_CERT=null
PGSQL_SSL_ROOT_CERT=${PGSQL_SSL_ROOT_CERT} PGSQL_SSL_CERT=null
PGSQL_SSL_CERT=${PGSQL_SSL_CERT} PGSQL_SSL_KEY=null
PGSQL_SSL_KEY=${PGSQL_SSL_KEY} PGSQL_SSL_CRL_FILE=null
PGSQL_SSL_CRL_FILE=${PGSQL_SSL_CRL_FILE}
# If you're looking for performance improvements, you could install memcached. # If you're looking for performance improvements, you could install memcached.
CACHE_DRIVER=file CACHE_DRIVER=file
@@ -60,15 +60,15 @@ SESSION_DRIVER=file
# You can configure another file storage backend if you cannot use the local storage option. # You can configure another file storage backend if you cannot use the local storage option.
# To set this up, fill in the following variables. The upload path is used to store uploaded # To set this up, fill in the following variables. The upload path is used to store uploaded
# files and the export path is to store exported data (before download). # files and the export path is to store exported data (before download).
SFTP_HOST=${SFTP_HOST} SFTP_HOST=
SFTP_PORT=${SFTP_PORT} SFTP_PORT=
SFTP_UPLOAD_PATH=${SFTP_UPLOAD_PATH} SFTP_UPLOAD_PATH=
SFTP_EXPORT_PATH=${SFTP_EXPORT_PATH} SFTP_EXPORT_PATH=
# SFTP uses either the username/password combination or the private key to authenticate. # SFTP uses either the username/password combination or the private key to authenticate.
SFTP_USERNAME=${SFTP_USERNAME} SFTP_USERNAME=
SFTP_PASSWORD="${SFTP_PASSWORD}" SFTP_PASSWORD=
SFTP_PRIV_KEY=${SFTP_PRIV_KEY} SFTP_PRIV_KEY=
# Cookie settings. Should not be necessary to change these. # Cookie settings. Should not be necessary to change these.
COOKIE_PATH="/" COOKIE_PATH="/"
@@ -77,90 +77,88 @@ COOKIE_SECURE=false
# If you want Firefly III to mail you, update these settings # If you want Firefly III to mail you, update these settings
# For instructions, see: https://firefly-iii.readthedocs.io/en/latest/installation/mail.html # For instructions, see: https://firefly-iii.readthedocs.io/en/latest/installation/mail.html
MAIL_DRIVER=${MAIL_DRIVER} MAIL_DRIVER=log
MAIL_HOST=${MAIL_HOST} MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=${MAIL_PORT} MAIL_PORT=2525
MAIL_FROM=${MAIL_FROM} MAIL_FROM=changeme@example.com
MAIL_USERNAME=${MAIL_USERNAME} MAIL_USERNAME=null
MAIL_PASSWORD="${MAIL_PASSWORD}" MAIL_PASSWORD=null
MAIL_ENCRYPTION=${MAIL_ENCRYPTION} MAIL_ENCRYPTION=null
# Other mail drivers: # Other mail drivers:
MAILGUN_DOMAIN=${MAILGUN_DOMAIN} MAILGUN_DOMAIN=
MAILGUN_SECRET=${MAILGUN_SECRET} MAILGUN_SECRET=
MANDRILL_SECRET=${MANDRILL_SECRET} MANDRILL_SECRET=
SPARKPOST_SECRET=${SPARKPOST_SECRET} SPARKPOST_SECRET=
# Firefly III can send you the following messages # Firefly III can send you the following messages
SEND_REGISTRATION_MAIL=true SEND_REGISTRATION_MAIL=true
SEND_ERROR_MESSAGE=false SEND_ERROR_MESSAGE=true
# These messages contain (sensitive) transaction information: # These messages contain (sensitive) transaction information:
SEND_REPORT_JOURNALS=${SEND_REPORT_JOURNALS} SEND_REPORT_JOURNALS=true
# Set a Mapbox API key here (see mapbox.com) so there might be a map available at various places. # Set a Mapbox API key here (see mapbox.com) so there might be a map available at various places.
MAPBOX_API_KEY=${MAPBOX_API_KEY} MAPBOX_API_KEY=
# Firefly III currently supports two provider for live Currency Exchange Rates: # Firefly III currently supports two provider for live Currency Exchange Rates:
# "fixer" is the default (for backward compatibility), and "ratesapi" is the new one. # "fixer" is the default (for backward compatibility), and "ratesapi" is the new one.
# RatesApi.IO (see https://ratesapi.io) is a FREE and OPEN SOURCE live currency exchange rates, # RatesApi.IO (see https://ratesapi.io) is a FREE and OPEN SOURCE live currency exchange rates,
# built compatible with Fixer.IO, based on data published by European Central Bank, and don't require API key. # built compatible with Fixer.IO, based on data published by European Central Bank, and doesn't require API key.
CER_PROVIDER=${CER_PROVIDER} CER_PROVIDER=ratesapi
# If you have select "fixer" as default currency exchange rates, # If you have select "fixer" as default currency exchange rates,
# set a Fixer IO API key here (see https://fixer.io) to enable live currency exchange rates. # set a Fixer IO API key here (see https://fixer.io) to enable live currency exchange rates.
# Please note that this WILL ONLY WORK FOR PAID fixer.io accounts because they severely limited # Please note that this WILL ONLY WORK FOR PAID fixer.io accounts because they severely limited
# the free API up to the point where you might as well offer nothing. # the free API up to the point where you might as well offer nothing.
FIXER_API_KEY=${FIXER_API_KEY} FIXER_API_KEY=
# If you wish to track your own behavior over Firefly III, set a valid analytics tracker ID here. # If you wish to track your own behavior over Firefly III, set a valid analytics tracker ID here.
ANALYTICS_ID=${ANALYTICS_ID} ANALYTICS_ID=
# Most parts of the database are encrypted by default, but you can turn this off if you want to.
# This makes it easier to migrate your database. Not that some fields will never be decrypted.
USE_ENCRYPTION=true
# Firefly III has two options for user authentication. "eloquent" is the default, # Firefly III has two options for user authentication. "eloquent" is the default,
# and "ldap" for LDAP servers. # and "ldap" for LDAP servers.
# For full instructions on these settings please visit: # For full instructions on these settings please visit:
# https://firefly-iii.readthedocs.io/en/latest/installation/authentication.html # https://firefly-iii.readthedocs.io/en/latest/installation/authentication.html
LOGIN_PROVIDER=${LOGIN_PROVIDER} LOGIN_PROVIDER=eloquent
# LDAP connection configuration # LDAP connection configuration
ADLDAP_CONNECTION_SCHEME=${ADLDAP_CONNECTION_SCHEME} # OpenLDAP, FreeIPA or ActiveDirectory
ADLDAP_AUTO_CONNECT=${ADLDAP_AUTO_CONNECT} ADLDAP_CONNECTION_SCHEME=OpenLDAP
ADLDAP_AUTO_CONNECT=true
# LDAP connection settings # LDAP connection settings
ADLDAP_CONTROLLERS=${ADLDAP_CONTROLLERS} ADLDAP_CONTROLLERS=
ADLDAP_PORT=${ADLDAP_PORT} ADLDAP_PORT=389
ADLDAP_TIMEOUT=${ADLDAP_TIMEOUT} ADLDAP_TIMEOUT=5
ADLDAP_BASEDN="${ADLDAP_BASEDN}" ADLDAP_BASEDN=""
ADLDAP_FOLLOW_REFFERALS=${ADLDAP_FOLLOW_REFFERALS} ADLDAP_FOLLOW_REFFERALS=false
ADLDAP_USE_SSL=${ADLDAP_USE_SSL} ADLDAP_USE_SSL=false
ADLDAP_USE_TLS=${ADLDAP_USE_TLS} ADLDAP_USE_TLS=false
ADLDAP_ADMIN_USERNAME=${ADLDAP_ADMIN_USERNAME} ADLDAP_ADMIN_USERNAME=
ADLDAP_ADMIN_PASSWORD="${ADLDAP_ADMIN_PASSWORD}" ADLDAP_ADMIN_PASSWORD=
ADLDAP_ACCOUNT_PREFIX="${ADLDAP_ACCOUNT_PREFIX}" ADLDAP_ACCOUNT_PREFIX=
ADLDAP_ACCOUNT_SUFFIX="${ADLDAP_ACCOUNT_SUFFIX}" ADLDAP_ACCOUNT_SUFFIX=
# LDAP authentication settings. # LDAP authentication settings.
ADLDAP_PASSWORD_SYNC=${ADLDAP_PASSWORD_SYNC} ADLDAP_PASSWORD_SYNC=false
ADLDAP_LOGIN_FALLBACK=${ADLDAP_LOGIN_FALLBACK} ADLDAP_LOGIN_FALLBACK=false
ADLDAP_DISCOVER_FIELD=${ADLDAP_DISCOVER_FIELD} ADLDAP_DISCOVER_FIELD=distinguishedname
ADLDAP_AUTH_FIELD=${ADLDAP_AUTH_FIELD} ADLDAP_AUTH_FIELD=distinguishedname
# Will allow SSO if your server provides an AUTH_USER field. # Will allow SSO if your server provides an AUTH_USER field.
WINDOWS_SSO_DISCOVER=${WINDOWS_SSO_DISCOVER} WINDOWS_SSO_DISCOVER=samaccountname
WINDOWS_SSO_KEY=${WINDOWS_SSO_KEY} WINDOWS_SSO_KEY=AUTH_USER
# field to sync as local username. # field to sync as local username.
ADLDAP_SYNC_FIELD=${ADLDAP_SYNC_FIELD} ADLDAP_SYNC_FIELD=userprincipalname
# You can disable the X-Frame-Options header if it interfears with tools like # You can disable the X-Frame-Options header if it interfears with tools like
# Organizr. This is at your own risk. # Organizr. This is at your own risk.
DISABLE_FRAME_HEADER=${DISABLE_FRAME_HEADER} DISABLE_FRAME_HEADER=false
# Leave the following configuration vars as is. # Leave the following configuration vars as is.
# Unless you like to tinker and know what you're doing. # Unless you like to tinker and know what you're doing.
@@ -178,7 +176,8 @@ PUSHER_SECRET=
PUSHER_ID= PUSHER_ID=
DEMO_USERNAME= DEMO_USERNAME=
DEMO_PASSWORD= DEMO_PASSWORD=
IS_DOCKER=true IS_DOCKER=false
USE_ENCRYPTION=false
IS_SANDSTORM=false IS_SANDSTORM=false
IS_HEROKU=false IS_HEROKU=false
BUNQ_USE_SANDBOX=false BUNQ_USE_SANDBOX=false