🏴☠️
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 php:7.1-fpm | |
LABEL maintainer="Paul Redmond <paul@bitpress.io>" | |
# Install application dependencies | |
RUN curl --silent --show-error --fail --location \ | |
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \ | |
"https://caddyserver.com/download/linux/amd64?plugins=http.expires,http.realip&license=personal" \ | |
| tar --no-same-owner -C /usr/bin/ -xz caddy \ | |
&& chmod 0755 /usr/bin/caddy \ | |
&& /usr/bin/caddy -version \ |
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
0.0.0.0 | |
root /srv/app/public | |
gzip | |
fastcgi / 127.0.0.1:9000 php | |
rewrite { | |
regexp .* | |
ext / | |
to /index.php?{query} | |
} |
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
#!/usr/bin/env bash | |
container=$(docker run --rm -d -v $(pwd)/src:/www/laravel -p 8300:8300 nginx-unit) | |
docker exec -ti $container curl -X PUT -d @/www/laravel/app.json --unix-socket /var/run/control.unit.sock http://localhost | |
echo "Container running @ $container" | |
echo "Here's the complete configuration object:" | |
docker exec -ti $container curl --unix-socket /var/run/control.unit.sock http://localhost |
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
{ | |
"listeners": { | |
"*:8300": { | |
"application": "laravel-demo" | |
} | |
}, | |
"applications": { | |
"laravel-demo": { | |
"type": "php", | |
"workers": 20, |
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 ubuntu:xenial | |
RUN set -xe \ | |
&& apt-get -y update \ | |
&& apt-get -y install --no-install-recommends curl php \ | |
&& curl http://nginx.org/keys/nginx_signing.key | apt-key add - \ | |
&& echo "deb http://nginx.org/packages/mainline/ubuntu/ xenial nginx" | tee -a /etc/apt/sources.list \ | |
&& echo "deb-src http://nginx.org/packages/mainline/ubuntu/ xenial nginx" | tee -a /etc/apt/sources.list \ | |
&& apt-get -y update \ | |
&& apt-get -y install unit \ |
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 php:7.1.8-apache | |
MAINTAINER Paul Redmond | |
COPY . /srv/app | |
COPY .docker/vhost.conf /etc/apache2/sites-available/000-default.conf | |
WORKDIR /srv/app | |
RUN docker-php-ext-install mbstring pdo pdo_mysql \ |
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
version: '3' | |
services: | |
app: | |
build: | |
context: . | |
dockerfile: .docker/Dockerfile | |
image: laravel-docker | |
ports: | |
- 8080:80 | |
volumes: |
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
version: '3' | |
services: | |
app: | |
build: | |
context: . | |
dockerfile: .docker/Dockerfile | |
image: laravel-docker | |
ports: | |
- 8080:80 | |
volumes: |
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
version: '3' | |
services: | |
app: | |
build: | |
context: . | |
dockerfile: .docker/Dockerfile | |
image: laravel-docker | |
ports: | |
- 8080:80 |
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
<VirtualHost *:80> | |
DocumentRoot /srv/app/public | |
<Directory "/srv/app/public"> | |
AllowOverride all | |
Require all granted | |
</Directory> | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined |