This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Using user-defined network eliminates need to use service links, | |
# and allows multiple compose stacks to join/leave network on a as-needed basis - | |
# as opposed to composing up or down an entire monolith compose stack. | |
# | |
# For benefits of user-defined bridge over default bridge https://docs.docker.com/network/bridge/ | |
# Compose networking: https://docs.docker.com/compose/networking/ | |
# Latest compose reference: https://docs.docker.com/compose/compose-file/#network-configuration-reference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update the apt package list. | |
sudo apt-get update -y | |
# Install Docker's package dependencies. | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save this into /etc/wsl.conf | |
# You will need sudo permissions setup in WSL. | |
# sudo vi /etc/wsl.conf | |
[automount] | |
enabled=true | |
# Mount root to /drive/ instead of /mnt/drive for docker compatibility. | |
root=/ | |
# Unsets (unmasks) -wx bits for group/other so perms don't show up as 777 on WSL. | |
options="metadata,umask=22,fmask=11" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: Bash on Windows does not currently apply umask properly, fix it here. | |
if [[ "$(umask)" = "0000" ]]; then | |
umask 0022 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alexanderallen/php7-fpm.core:alpine-3.11 as core | |
ENV \ | |
SSH_PRIVATE_KEY="/root/.ssh/id_rsa" \ | |
LANG="en_US.UTF-8" \ | |
LC_ALL="en_US.UTF-8" \ | |
LANGUAGE="en_US.UTF-8" \ | |
TERM="xterm" \ | |
# Register the COMPOSER_HOME environment variable. | |
COMPOSER_HOME=/composer \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alexanderallen/php7-fpm.core:alpine-3.11 as core | |
ENV \ | |
SSH_PRIVATE_KEY="/root/.ssh/id_rsa" \ | |
LANG="en_US.UTF-8" \ | |
LC_ALL="en_US.UTF-8" \ | |
LANGUAGE="en_US.UTF-8" \ | |
TERM="xterm" \ | |
# Register the COMPOSER_HOME environment variable. | |
COMPOSER_HOME=/composer \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "alexanderallen/php-cli.drush9", | |
"description": "Composer dependencies for Drupal 8.4+ development.", | |
"require": { | |
"drush/drush": "~9.0", | |
"symfony/yaml": "~3.0", | |
"pear/pear-core-minimal": "1.10.1" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 8080; | |
server_name localhost; | |
root /app/web; ## <-- Your only path reference. | |
location = /favicon.ico { | |
log_not_found off; | |
access_log off; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nginx: | |
image: alexanderallen/nginx:1.17-alpine | |
tty: true | |
entrypoint: 'su-exec nobody /usr/sbin/nginx -g "daemon off;"' | |
ports: | |
- 80:8080 | |
- 443:443 | |
healthcheck: | |
test: curl --fail -s http://localhost:80 || exit 1 | |
interval: 30s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The php files are mounted from the host so access is slow. | |
slow: pull www | |
docker run --rm --name symfony-demo -p 8080:8080 -v $(shell pwd)/www:/var/www djs55/symfony-demo |