Skip to content

Commit

Permalink
ci: Fix Dockerfile and associated scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmackay committed Apr 26, 2018
1 parent d02109b commit 3742cd2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
@@ -1,14 +1,14 @@
FROM ushahidi/php-fpm-nginx:php-5.6
FROM ushahidi/php-fpm-nginx:php-7.0

WORKDIR /var/www
COPY composer.json ./
COPY composer.lock ./
RUN composer install --no-autoloader
RUN composer install --no-autoloader --no-scripts

COPY . .
RUN chgrp -R 0 . && chmod -R g+rwX . && \
usermod -g 0 www-data && \
chmod 777 application/cache application/media/uploads application/logs
chmod 777 storage

COPY docker/common.sh /common.sh
COPY docker/run.tasks.conf /etc/chaperone.d/
Expand Down
4 changes: 2 additions & 2 deletions docker/common.sh
Expand Up @@ -9,12 +9,12 @@ check_vols_src() {
}

check_migrations_pending() {
local n_pending=$(./bin/phinx status --no-ansi -c application/phinx.php | grep -E '^[[:space:]]+down[[:space:]]+' | wc -l)
local n_pending=$(./bin/phinx status --no-ansi -c phinx.php | grep -E '^[[:space:]]+down[[:space:]]+' | wc -l)
[ $n_pending -gt 0 ]
}

run_migrations() {
./bin/phinx migrate -c application/phinx.php
composer migrate
}

function sync {
Expand Down
12 changes: 6 additions & 6 deletions docker/run.tasks.conf
@@ -1,39 +1,39 @@
platform.dataprovider.outgoing.service: {
type: cron,
directory: "/var/www",
command: "bin/ushahidi dataprovider outgoing",
command: "artisan dataprovider:outgoing",
interval: "* * * * */5",
enabled: "$(ENABLE_PLATFORM_TASKS:-false)"
}

platform.dataprovider.incoming.service: {
type: cron,
directory: "/var/www",
command: "bin/ushahidi dataprovider incoming",
command: "artisan dataprovider:incoming",
interval: "* * * * */5",
enabled: "$(ENABLE_PLATFORM_TASKS:-false)"
}

platform.savedsearch.service: {
type: cron,
directory: "/var/www",
command: "bin/ushahidi savedsearch",
command: "artisan savedsearch:sync",
interval: "* * * * */5",
enabled: "$(ENABLE_PLATFORM_TASKS:-false)"
}

platform.notification.queue.service: {
type: cron,
directory: "/var/www",
command: "bin/ushahidi queue service",

This comment has been minimized.

Copy link
@rjmackay

rjmackay Apr 26, 2018

Author Contributor

@tuxpiper I'm not actually sure what this was. I've swapped it for notification:queue but I didn't think we had a queue service before?

This comment has been minimized.

Copy link
@tuxpiper

tuxpiper Apr 26, 2018

Member

hm I'm not sure myself either now . Looks like a good change to me.

directory: "/var/www",
command: "artisan notification:queue",
interval: "* * * * */5",
enabled: "$(ENABLE_PLATFORM_TASKS:-false)"
}

platform.webhook.send.service: {
type: cron,
directory: "/var/www",
command: "bin/ushahidi webhook send",
command: "artisan webhook:send",
interval: "* * * * */5",
enabled: "$(ENABLE_PLATFORM_TASKS:-false)"
}
2 changes: 1 addition & 1 deletion docker/test.Dockerfile
@@ -1,4 +1,4 @@
FROM ushahidi/php-ci:php-7.0.28
FROM ushahidi/php-ci:php-7.0

WORKDIR /var/www
COPY composer.json ./
Expand Down

0 comments on commit 3742cd2

Please sign in to comment.