-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
199 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Dante Lopez | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# dockdock | ||
Your so-so dockerized local playground. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
version: "3" | ||
|
||
networks: | ||
backend: | ||
ipam: | ||
driver: ${NETWORKS_DRIVER} | ||
config: | ||
- subnet: ${IPV4_SUBNET_MASK} | ||
- subnet: ${IPV6_SUBNET_MASK} | ||
|
||
services: | ||
nginx: | ||
build: | ||
context: ./services/nginx | ||
ports: | ||
- "${HOST_NGINX_HTTP_PORT}:${NGINX_EXPOSE_HTTP_PORT}" | ||
volumes: | ||
- ${HOST_APP_DIR}:${NGINX_WEB_ROOT} | ||
- ${NGINX_SITES_PATH}:${NGINX_SITES_AVAILABLE_PATH} | ||
networks: | ||
backend: | ||
ipv4_address: ${IPV4_STATIC_IP} | ||
ipv6_address: ${IPV6_STATIC_IP} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Host | ||
HOST_APP_DIR=/home/dqlopez/Dev | ||
HOST_NGINX_HTTP_PORT=80 | ||
|
||
# Nginx | ||
NGINX_WEB_ROOT=/var/www/html | ||
NGINX_EXPOSE_HTTP_PORT=80 | ||
NGINX_SITES_PATH=./services/nginx/sites/ | ||
NGINX_SITES_AVAILABLE_PATH=/etc/nginx/sites-available | ||
|
||
# Drivers | ||
VOLUMES_DRIVER=local | ||
NETWORKS_DRIVER=default | ||
|
||
# Networks | ||
IPV4_STATIC_IP=172.16.238.10 | ||
IPV6_STATIC_IP=2001:3984:3989::10 | ||
IPV4_SUBNET_MASK=172.16.238.0/24 | ||
IPV6_SUBNET_MASK=2001:3984:3989::/64 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM nginx:stable-alpine | ||
|
||
LABEL maintainer="Dante Lopez <[email protected]>" | ||
|
||
WORKDIR /var/www/html | ||
|
||
RUN rm /etc/nginx/conf.d/default.conf | ||
|
||
COPY nginx.conf /etc/nginx/ | ||
|
||
COPY default.conf /etc/nginx/conf.d/ | ||
|
||
EXPOSE 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
server { | ||
|
||
listen 80 default_server; | ||
listen [::]:80 default_server ipv6only=on; | ||
|
||
# For https | ||
# listen 443 ssl default_server; | ||
# listen [::]:443 ssl default_server ipv6only=on; | ||
# ssl_certificate /etc/nginx/ssl/default.crt; | ||
# ssl_certificate_key /etc/nginx/ssl/default.key; | ||
|
||
server_name localhost; | ||
root /usr/share/nginx/html; | ||
index index.php index.html index.htm; | ||
|
||
location ~ /\.ht { | ||
deny all; | ||
} | ||
|
||
location /.well-known/acme-challenge/ { | ||
root /var/www/letsencrypt/; | ||
log_not_found 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
worker_processes 4; | ||
pid /run/nginx.pid; | ||
|
||
events { | ||
worker_connections 2048; | ||
} | ||
|
||
http { | ||
server_tokens off; | ||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 15; | ||
types_hash_max_size 2048; | ||
client_max_body_size 20M; | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
access_log /dev/stdout; | ||
error_log /dev/stderr; | ||
gzip on; | ||
gzip_disable "msie6"; | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
include /etc/nginx/sites-available/*.conf; | ||
open_file_cache off; | ||
charset UTF-8; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
server { | ||
|
||
listen 80; | ||
listen [::]:80; | ||
|
||
# For https | ||
# listen 443 ssl; | ||
# listen [::]:443 ssl ipv6only=on; | ||
# ssl_certificate /etc/nginx/ssl/default.crt; | ||
# ssl_certificate_key /etc/nginx/ssl/default.key; | ||
|
||
server_name app.local; | ||
root /var/www/html; | ||
index index.php index.html index.htm; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php$is_args$args; | ||
} | ||
|
||
location ~ \.php$ { | ||
try_files $uri /index.php =404; | ||
fastcgi_pass php-upstream; | ||
fastcgi_index index.php; | ||
fastcgi_buffers 16 16k; | ||
fastcgi_buffer_size 32k; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
#fixes timeouts | ||
fastcgi_read_timeout 600; | ||
include fastcgi_params; | ||
} | ||
|
||
location ~ /\.ht { | ||
deny all; | ||
} | ||
|
||
location /.well-known/acme-challenge/ { | ||
root /var/www/letsencrypt/; | ||
log_not_found off; | ||
} | ||
|
||
error_log /var/log/nginx/app_error.log; | ||
access_log /var/log/nginx/app_access.log; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
server { | ||
|
||
listen 80; | ||
listen [::]:80; | ||
|
||
# For https | ||
# listen 443 ssl; | ||
# listen [::]:443 ssl ipv6only=on; | ||
# ssl_certificate /etc/nginx/ssl/default.crt; | ||
# ssl_certificate_key /etc/nginx/ssl/default.key; | ||
|
||
server_name test.local; | ||
root /var/www/html/personal/test; | ||
index index.php index.html index.htm; | ||
|
||
location ~ /\.ht { | ||
deny all; | ||
} | ||
|
||
location /.well-known/acme-challenge/ { | ||
root /var/www/letsencrypt/; | ||
log_not_found off; | ||
} | ||
|
||
error_log /var/log/nginx/app_error.log; | ||
access_log /var/log/nginx/app_access.log; | ||
} |