Docker Global Setup makes it much easier to develop websites. This bundles the most important services into a single package using Docker.
The individual websites then still need the pluswerk/php-dev package and that's all.
This setup is extensible and well customizable for the individual needs of a project.
You need Docker and a few free ports, depending on whether you want to customize it even further.
- Docker
- Free Ports: 80, 443, 1025, 3306, 3308
Before you start the setup you need to stop all processes what block ports 80, 443, 1025, 3306.
git clone git@github.com:pluswerk/docker-global.git global
cd global
# always start it with this command(if it is not running already):
bash start.sh start
These Environment variables are required for docker-global to start.
TLD_DOMAIN=vm23.your.tld
HTTPS_MAIN_DOMAIN=vm23.your.tld
DNS_CLOUDFLARE_EMAIL=cloudflare@yourmail
DNS_CLOUDFLARE_API_KEY=0123456789abcdefghijklmnopqrstuvwxyz
We use kanti/local-https for our certificate generation:
If you want HTTPS for your setup you need to set this ENV variables: (in .env
)
# required:
HTTPS_MAIN_DOMAIN=your.tld
DNS_CLOUDFLARE_API_TOKEN=_aA_AaBbCc12GgHh34_HX77AbCdEf9_23FgHtZax
# optional:
SLACK_TOKEN=111111111/222222222/333333333333333333333333
SENTRY_DSN=https://0123456789abcdefghijklmnopqrstuvwxyz@sentry.com/123456
You can create a .env
file and overwrite some Settings:
# restart global containers? https://docs.docker.com/compose/compose-file/#restart
RESTART=always
# host ports: You can change the ports without breaking php-dev installations. (maybe if you change 80 or 443)
HTTP_PORT=80
HTTPS_PORT=443
DB_PORT=3306
SMTP_PORT=1025
DDNS_INTERFACE=eth0
CUSTOM_LOOKUP_CMD=echo '127.0.0.1'
See the Documentation of this Setup System.