FIX: cron ENV vars
This commit is contained in:
@ -1,16 +1,20 @@
|
||||
FROM php:8.2-fpm
|
||||
FROM php:8.2-cli
|
||||
|
||||
ENV TZ "America/Santiago"
|
||||
ENV TZ "${TZ}"
|
||||
ENV APP_NAME "${APP_NAME}"
|
||||
ENV API_URL "${API_URL}"
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends cron && rm -r /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends cron rsyslog nano && rm -r /var/lib/apt/lists/*
|
||||
|
||||
RUN pecl install xdebug-3.2.2 \
|
||||
&& docker-php-ext-enable xdebug
|
||||
&& docker-php-ext-enable xdebug \
|
||||
&& echo "#/bin/bash\nprintenv >> /etc/environment\ncron -f -L 11" > /root/entrypoint && chmod a+x /root/entrypoint
|
||||
|
||||
COPY ./php-errors.ini /usr/local/etc/php/conf.d/docker-php-errors.ini
|
||||
|
||||
WORKDIR /code/bin
|
||||
|
||||
COPY ./cli/crontab /var/spool/cron/crontabs/root
|
||||
#COPY --chmod=644 ./cli/crontab /etc/cron.d/cronjob
|
||||
COPY --chmod=644 ./cli/crontab /var/spool/cron/crontabs/root
|
||||
|
||||
CMD ["cron", "-f"]
|
||||
CMD [ "/root/entrypoint" ]
|
||||
|
5
cli/bin/incoviba
Normal file
5
cli/bin/incoviba
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /etc/profile
|
||||
|
||||
/usr/local/bin/php /code/bin/index.php "$@"
|
16
cli/crontab
16
cli/crontab
@ -1,8 +1,8 @@
|
||||
0 2 * * * php /code/bin/index.php ventas:cuotas:hoy 2>&1 >> /logs/commands
|
||||
0 2 * * * php /code/bin/index.php ventas:cuotas:pendientes 2>&1 >> /logs/commands
|
||||
0 2 * * * php /code/bin/index.php ventas:cuotas:vencer 2>&1 >> /logs/commands
|
||||
0 2 * * * php /code/bin/index.php ventas:cierres:vigentes 2>&1 >> /logs/commands
|
||||
0 2 * * * php /code/bin/index.php proyectos:activos 2>&1 >> /logs/commands
|
||||
0 2 * * * php /code/bin/index.php comunas 2>&1 >> /logs/commands
|
||||
0 2 * * * php /code/bin/index.php money:uf 2>&1 >> /logs/commands
|
||||
0 2 1 * * php /code/bin/index.php money:ipc 2>&1 >> /logs/commands
|
||||
0 2 * * * /code/bin/incoviba ventas:cuotas:hoy >> /logs/commands 2>&1
|
||||
0 2 * * * /code/bin/incoviba ventas:cuotas:pendientes >> /logs/commands 2>&1
|
||||
0 2 * * * /code/bin/incoviba ventas:cuotas:vencer >> /logs/commands 2>&1
|
||||
0 2 * * * /code/bin/incoviba ventas:cierres:vigentes >> /logs/commands 2>&1
|
||||
0 2 * * * /code/bin/incoviba proyectos:activos >> /logs/commands 2>&1
|
||||
0 2 * * * /code/bin/incoviba comunas >> /logs/commands 2>&1
|
||||
0 2 * * * /code/bin/incoviba money:uf >> /logs/commands 2>&1
|
||||
0 2 1 * * /code/bin/incoviba money:ipc >> /logs/commands 2>&1
|
||||
|
@ -1,15 +1,10 @@
|
||||
version: '3'
|
||||
|
||||
x-restart: &restart
|
||||
restart: unless-stopped
|
||||
|
||||
services:
|
||||
proxy:
|
||||
profiles:
|
||||
- app
|
||||
image: nginx:alpine
|
||||
container_name: incoviba_proxy
|
||||
<<: *restart
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${APP_PORT}:80"
|
||||
volumes:
|
||||
@ -22,12 +17,10 @@ services:
|
||||
- app
|
||||
build: .
|
||||
container_name: incoviba_web
|
||||
<<: *restart
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ${APP_PATH:-.}/.env
|
||||
# - ${APP_PATH:-.}/.db.env
|
||||
- ./.key.env
|
||||
#- ${APP_PATH:-.}/.remote.env
|
||||
volumes:
|
||||
- ${APP_PATH:-.}/:/code
|
||||
- ./logs/php:/logs
|
||||
@ -37,7 +30,7 @@ services:
|
||||
- db
|
||||
image: mariadb:latest
|
||||
container_name: incoviba_db
|
||||
<<: *restart
|
||||
restart: unless-stopped
|
||||
env_file: ${APP_PATH:-.}/.db.env
|
||||
volumes:
|
||||
- dbdata:/var/lib/mysql
|
||||
@ -53,22 +46,13 @@ services:
|
||||
- cache
|
||||
image: redis
|
||||
container_name: incoviba_redis
|
||||
<<: *restart
|
||||
restart: unless-stopped
|
||||
env_file: ${APP_PATH:-.}/.redis.env
|
||||
volumes:
|
||||
- incoviba_redis:/data
|
||||
ports:
|
||||
- "63790:6379"
|
||||
|
||||
python:
|
||||
profiles:
|
||||
- python
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Python.Dockerfile
|
||||
container_name: incoviba_python
|
||||
<<: *restart
|
||||
|
||||
logview:
|
||||
profiles:
|
||||
- log
|
||||
@ -81,7 +65,7 @@ services:
|
||||
WEB_URL: 'http://provm.cl:8084'
|
||||
WEB_PORT: '8084'
|
||||
volumes:
|
||||
- "./logs:/logs"
|
||||
- ./logs:/logs
|
||||
ports:
|
||||
- "8084:80"
|
||||
cli:
|
||||
@ -91,7 +75,7 @@ services:
|
||||
context: .
|
||||
dockerfile: CLI.Dockerfile
|
||||
container_name: incoviba_cli
|
||||
<<: *restart
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ${CLI_PATH:-.}/.env
|
||||
- ./.key.env
|
||||
|
Reference in New Issue
Block a user