Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
## base
FROM ghcr.io/eramba/php:8.1-apache as base

# Install rsync
RUN apt-get update && apt-get install -y rsync

# Setup vhost
COPY ./docker/apache/vhost.conf /etc/apache2/sites-available/000-default.conf

Expand Down
7 changes: 4 additions & 3 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/sh

# chown www-data: -R /var/www

cd /var/www/eramba || exit

# syncing dir structure into /data folder from /data_template
su -s /bin/bash -c "rsync -rv app/upgrade/data_template/ app/upgrade/data/" www-data

# when deploying a code or DB migration change and you want the "old workers" based on the old code
# to not process any new incoming jobs after deployment.
su -s /bin/bash -c "php app/upgrade/bin/cake.php queue worker end all -q" www-data
Expand All @@ -20,6 +21,6 @@ su -s /bin/bash -c "php app/upgrade/bin/cake.php database initialize" www-data
su -s /bin/bash -c "php app/upgrade/bin/cake.php setup.maintenance_mode deactivate" www-data

# Initialize a worker with the deployment so we won't have to wait for the cron to kick in which can take up to 10 minutes.
su -s /bin/bash -c "php app/upgrade/bin/cake.php queue run -v" www-data 2>&1 &
su -s /bin/bash -c "php app/upgrade/bin/cake.php queue run -v" www-data 2>&1 &

exec docker-php-entrypoint "$@"