Skip to content

Instantly share code, notes, and snippets.

View alexbenfica's full-sized avatar

Alex Benfica alexbenfica

View GitHub Profile
@alexbenfica
alexbenfica / crontab
Created October 2, 2018 20:39
This crontab executes a docker exec command
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
@alexbenfica
alexbenfica / crontab
Last active May 11, 2020 19:02
Cron running docker exec (did not work)
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
@alexbenfica
alexbenfica / Dockerfile
Last active March 17, 2022 21:26
Dockerfile for WordPress development with PHP xDebug
FROM wordpress:4.9.6-php7.2-apache
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
nano \
gnupg1 \
gnupg2 \
nodejs \
ca-certificates \
@alexbenfica
alexbenfica / docker-compose.yml
Last active July 19, 2018 23:23
Simple WordPress docker-compose.yml file. Useful to create a local devel environment
version: "3"
services:
mysql:
restart: always
image: mysql:5.5.58
container_name: mysql_wordpress
environment:
MYSQL_USER: mysql
MYSQL_PASSWORD: mysql