Skip to content

Commit

Permalink
Move a responsabilidade da trigger do comando php para o crontab
Browse files Browse the repository at this point in the history
  • Loading branch information
lpirola committed Jul 5, 2024
1 parent 0689ba5 commit 49ec59f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/helm/api-platform/charts/*
!/helm/api-platform/charts/.gitignore
api/mapas/public/assets/*
api/.env
42 changes: 21 additions & 21 deletions compose.override.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Development environment override
services:
php:
build:
context: ./api
target: frankenphp_dev
volumes:
- ./api:/app
# - /app/var
- var-files:/app/var
- ./api/frankenphp/Caddyfile:/etc/caddy/Caddyfile:ro
- ./api/frankenphp/conf.d/app.dev.ini:/usr/local/etc/php/conf.d/app.dev.ini:ro
# If you develop on Mac or Windows you can remove the vendor/ directory
# from the bind-mount for better performance by enabling the next line:
#- /app/vendor
environment:
MERCURE_EXTRA_DIRECTIVES: demo
# See https://xdebug.org/docs/all_settings#mode
XDEBUG_MODE: "${XDEBUG_MODE:-off}"
extra_hosts:
# Ensure that host.docker.internal is correctly defined on Linux
- host.docker.internal:host-gateway
tty: true
# php:
# build:
# context: ./api
# target: frankenphp_dev
# volumes:
# - ./api:/app
# # - /app/var
# - var-files:/app/var
# - ./api/frankenphp/Caddyfile:/etc/caddy/Caddyfile:ro
# - ./api/frankenphp/conf.d/app.dev.ini:/usr/local/etc/php/conf.d/app.dev.ini:ro
# # If you develop on Mac or Windows you can remove the vendor/ directory
# # from the bind-mount for better performance by enabling the next line:
# #- /app/vendor
# environment:
# MERCURE_EXTRA_DIRECTIVES: demo
# # See https://xdebug.org/docs/all_settings#mode
# XDEBUG_MODE: "${XDEBUG_MODE:-off}"
# extra_hosts:
# # Ensure that host.docker.internal is correctly defined on Linux
# - host.docker.internal:host-gateway
# tty: true

pwa:
build:
Expand Down
13 changes: 11 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,37 @@ services:
# - pgadmin:/var/lib/pgadmin
# ports:
# - 5050:80
crontab:
image: rancher/container-crontab:v0.5.0
restart: '${DOCKER_RESTART_POLICY:-always}'
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"

recreate-pending-pcache:
image: ghcr.io/redemapas/mapas:feat-new-theme
extends:
service: php
command: sh ./mapas/docker/recreate-pending-pcache-cron.sh
command: php ./mapas/src/tools/recreate-pending-pcache.php
depends_on:
- php
volumes:
# - ./api:/app
- var-files:/app/var/private-files
labels:
- "cron.schedule=* * * ? * *"

execute-job:
image: ghcr.io/redemapas/mapas:feat-new-theme
extends:
service: php
command: sh ./mapas/docker/jobs-cron.sh
command: php ./mapas/src/tools/execute-job.php
depends_on:
- php
volumes:
# - ./api:/app
- var-files:/app/var/private-files
labels:
- "cron.schedule=* * * ? * *"

# db-update:
# extends:
Expand Down

0 comments on commit 49ec59f

Please sign in to comment.