Setup the project directory:
mkdir wordpress-composer
cd wordpress-composer
# The official MySQL (https://hub.docker.com/_/mysql/) supports only one MYSQL_DATABASE environment variable. | |
# By modifying the entrypoint and passing shell script, you can create multiple dbs without having to make a mysql image just for this purpose. | |
version: '3' | |
services: | |
# Some other service connecting to mysql | |
db: | |
image: mysql:5.6 |
# Docker-in-Docker Gitlab runners setup taken from: | |
# https://medium.com/@tonywooster/docker-in-docker-in-gitlab-runners-220caeb708ca | |
dind: | |
restart: always | |
privileged: true | |
volumes: | |
- /var/lib/docker | |
image: docker:17.09.0-ce-dind | |
command: | |
- --storage-driver=overlay2 |
According to 12 factor app, the best way to configure things for deployment is through environment variables, not necessarily environment variable files, but just any environment variables. The problem is how to get environment variables into PHP. It is quite complicated depending on what you're doing.
The first step is to make sure you're using getenv
in PHP for environment variables as the $_ENV
array may not be set unless you set variables_order=EGPCS
in the INI settings. This is enough for command line PHP applications including the command line PHP server.
If you're running PHP through Apache either via mod_php or CGI, the only way is to use an .htaccess
file along the path from the index.php
to the document root and to use SetEnv NAME Value
directives. Or you put them into the Virtual Host block inside Apache configuration.
If you're using NGINX + PHP-FPM. You have 3 options:
gitlab: | |
image: 'gitlab/gitlab-ce:latest' | |
container_name: gitlab | |
restart: always | |
hostname: 'gitlab.mcu.dc' | |
environment: | |
GITLAB_OMNIBUS_CONFIG: | | |
external_url 'http://gitlab.mcu.dc:8090' | |
gitlab_rails['gitlab_shell_ssh_port'] = 2290 | |
gitlab_rails['smtp_enable'] = true |
#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` |
# Add this snippet to the top of your playbook. | |
# It will install python2 if missing (but checks first so no expensive repeated apt updates) | |
# gwillem@gmail.com | |
- hosts: all | |
gather_facts: False | |
tasks: | |
- name: install python 2 | |
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
The following will guide you through the process of enabling SSL on a Apache webserver
Create a directory within /etc/apache2/
using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:
1 - Inicio | |
2 - Se crea una class final | |
3 - Se crea una class Event | |
4 - Se crea una class EventListener | |
5 - Se registra el Listener como servicio | |
6 - Se lanza el event |