-
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.
Adds dockerfiles for the joblocal base images
- Loading branch information
0 parents
commit 7de7150
Showing
17 changed files
with
313 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,13 @@ | ||
FROM node:10.8.0-alpine | ||
|
||
LABEL maintainer="joblocal GmbH <produktentwicklung@joblocal.de>" | ||
|
||
RUN apk add --update python3 \ | ||
curl \ | ||
bash \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
RUN curl -O https://bootstrap.pypa.io/get-pip.py \ | ||
&& python3 get-pip.py \ | ||
&& pip install --upgrade pip \ | ||
&& pip install awscli --upgrade |
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,45 @@ | ||
FROM alpine:3.7 | ||
|
||
LABEL maintainer="joblocal GmbH <produktentwicklung@joblocal.de>" | ||
|
||
ENV \ | ||
DEPS="ca-certificates \ | ||
nginx \ | ||
nginx-mod-http-headers-more \ | ||
memcached \ | ||
php7 \ | ||
php7-fpm \ | ||
php7-curl \ | ||
php7-ctype \ | ||
php7-dom \ | ||
php7-memcached \ | ||
php7-mbstring \ | ||
php7-json \ | ||
php7-xml \ | ||
php7-pdo_mysql \ | ||
php7-pdo_sqlite \ | ||
php7-simplexml \ | ||
runit \ | ||
bash" | ||
|
||
RUN addgroup -g 1000 -S www-data \ | ||
&& adduser -u 1000 -D -S -G www-data www-data | ||
|
||
RUN apk add --update $DEPS \ | ||
&& rm -rf /var/cache/apk/* \ | ||
&& ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log | ||
|
||
|
||
# Set Timezone to UTC and remove apk cache | ||
RUN apk add --update tzdata \ | ||
&& cp /usr/share/zoneinfo/UTC /etc/localtime \ | ||
&& echo "UTC" > /etc/timezone \ | ||
&& apk del tzdata \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
COPY ./rootfs / | ||
|
||
EXPOSE 80 | ||
|
||
CMD ["/sbin/runit-wrapper"] |
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,37 @@ | ||
server { | ||
listen 80 default_server; | ||
|
||
charset utf-8; | ||
|
||
root /var/www/public; | ||
index index.php index.html; | ||
|
||
location = /ping { | ||
access_log off; | ||
log_not_found off; | ||
|
||
try_files $uri /index.php =404; | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
fastcgi_pass unix:/var/run/php-fpm.sock; | ||
fastcgi_index index.php; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
include fastcgi_params; | ||
} | ||
|
||
location / { | ||
# remove trailing slash | ||
rewrite ^/(.*)/$ /$1 permanent; | ||
|
||
# try to find requested file | ||
try_files $uri $uri/ /index.php?$query_string; | ||
} | ||
|
||
location ~ \.php$ { | ||
try_files $uri /index.php =404; | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
fastcgi_pass unix:/var/run/php-fpm.sock; | ||
fastcgi_index index.php; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
include fastcgi_params; | ||
} | ||
} |
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,66 @@ | ||
daemon off; | ||
worker_processes auto; | ||
pid /run/nginx.pid; | ||
include /etc/nginx/modules-enabled/*.conf; | ||
|
||
events { | ||
worker_connections 768; | ||
# multi_accept on; | ||
} | ||
|
||
http { | ||
|
||
## | ||
# Basic Settings | ||
## | ||
|
||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 65; | ||
types_hash_max_size 2048; | ||
variables_hash_max_size 2048; | ||
variables_hash_bucket_size 1024; | ||
# server_tokens off; | ||
|
||
# server_names_hash_bucket_size 64; | ||
# server_name_in_redirect off; | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
## | ||
# SSL Settings | ||
## | ||
|
||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE | ||
ssl_prefer_server_ciphers on; | ||
|
||
## | ||
# Logging Settings | ||
## | ||
|
||
access_log /var/log/nginx/access.log; | ||
error_log /var/log/nginx/error.log; | ||
|
||
## | ||
# Gzip Settings | ||
## | ||
|
||
gzip on; | ||
gzip_disable "msie6"; | ||
|
||
# gzip_vary on; | ||
# gzip_proxied any; | ||
# gzip_comp_level 6; | ||
# gzip_buffers 16 8k; | ||
# gzip_http_version 1.1; | ||
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; | ||
|
||
## | ||
# Virtual Host Configs | ||
## | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
include /etc/nginx/sites-enabled/*; | ||
} |
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 @@ | ||
expose_php = 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 @@ | ||
extension=memcached.so |
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,49 @@ | ||
[global] | ||
pid = /var/run/php-fpm.pid | ||
error_log = /proc/self/fd/2 | ||
daemonize = no | ||
emergency_restart_threshold = 10 | ||
emergency_restart_interval = 1m | ||
process_control_timeout = 10s | ||
|
||
[www] | ||
user = www-data | ||
group = www-data | ||
listen = /var/run/php-fpm.sock | ||
listen.owner = www-data | ||
listen.group = www-data | ||
listen.allowed_clients = 127.0.0.1 | ||
pm = dynamic | ||
pm.max_children = 35 | ||
pm.start_servers = 15 | ||
pm.min_spare_servers = 15 | ||
pm.max_spare_servers = 25 | ||
pm.max_requests = 500 | ||
chdir = / | ||
catch_workers_output = yes | ||
; access.log = /proc/self/fd/2 | ||
slowlog = /proc/self/fd/2 | ||
request_slowlog_timeout = 30s | ||
|
||
; environment variables | ||
env[APP_ENV]=$APP_ENV | ||
env[APP_DEBUG]=$APP_DEBUG | ||
env[APP_KEY]=$APP_KEY | ||
|
||
env[DB_CONNECTION]=$DB_CONNECTION | ||
|
||
env[CACHE_DRIVER]=$CACHE_DRIVER | ||
env[MEMCACHED_HOST]=$MEMCACHED_HOST | ||
env[MEMCACHED_PORT]=$MEMCACHED_PORT | ||
|
||
env[AWS_ACCESS_KEY_ID]=$AWS_ACCESS_KEY_ID | ||
env[AWS_SECRET_ACCESS_KEY]=$AWS_SECRET_ACCESS_KEY | ||
env[AWS_DEFAULT_REGION]=$AWS_DEFAULT_REGION | ||
|
||
env[QUEUE_DRIVER]=$QUEUE_DRIVER | ||
env[QUEUE_URL]=$QUEUE_URL | ||
|
||
env[GUZZLE_BASE_URI]=$GUZZLE_BASE_URI | ||
env[GUZZLE_TIMEOUT]=$GUZZLE_TIMEOUT | ||
|
||
env[SENTRY_DSN]=$SENTRY_DSN |
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,7 @@ | ||
#!/bin/sh | ||
|
||
exec 2>&1 | ||
source /env | ||
|
||
mkdir -p /run/nginx | ||
exec /usr/sbin/nginx -c '/etc/nginx/nginx.conf' |
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,3 @@ | ||
#!/bin/sh | ||
|
||
/usr/sbin/php-fpm7 |
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,17 @@ | ||
#!/bin/sh | ||
|
||
main() { | ||
export > /env | ||
|
||
trap onterm SIGTERM SIGINT | ||
|
||
/sbin/runsvdir-start & | ||
wait "$!" | ||
} | ||
|
||
onterm() { | ||
pkill -SIGHUP runsvdir-start | ||
exit $? | ||
} | ||
|
||
main "$@" |
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,5 @@ | ||
#!/bin/sh | ||
|
||
export PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin | ||
|
||
exec runsvdir -P /etc/service |
Binary file not shown.
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 @@ | ||
FROM joblocal/base-app:alpine-3.7 | ||
|
||
LABEL maintainer="joblocal GmbH <produktentwicklung@joblocal.de>" | ||
|
||
RUN apk add --update \ | ||
curl \ | ||
ghostscript \ | ||
imagemagick \ | ||
php7-apcu \ | ||
php7-fileinfo \ | ||
php7-iconv \ | ||
php7-imagick \ | ||
php7-opcache \ | ||
php7-phar \ | ||
php7-simplexml \ | ||
php7-tokenizer \ | ||
php7-xsl \ | ||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
WORKDIR /workspace | ||
|
||
VOLUME /workspace |
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,37 @@ | ||
FROM alpine:3.7 | ||
|
||
LABEL maintainer="joblocal GmbH <produktentwicklung@joblocal.de>" | ||
|
||
ENV \ | ||
DEPS="ca-certificates \ | ||
memcached \ | ||
php7 \ | ||
php7-curl \ | ||
php7-ctype \ | ||
php7-dom \ | ||
php7-memcached \ | ||
php7-mbstring \ | ||
php7-json \ | ||
php7-xml \ | ||
php7-pdo_mysql \ | ||
php7-pdo_sqlite \ | ||
php7-simplexml \ | ||
runit \ | ||
bash" | ||
|
||
RUN addgroup -g 1000 -S www-data \ | ||
&& adduser -u 1000 -D -S -G www-data www-data | ||
|
||
RUN apk add --update $DEPS \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
# Set Timezone to UTC | ||
RUN apk add --update tzdata \ | ||
&& cp /usr/share/zoneinfo/UTC /etc/localtime \ | ||
&& echo "UTC" > /etc/timezone \ | ||
&& apk del tzdata \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
COPY ./rootfs / | ||
|
||
CMD ["/usr/bin/queuelistener.sh"] |
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 @@ | ||
extension=memcached.so |
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,8 @@ | ||
#!/bin/sh | ||
|
||
echo "Starting queue listener" | ||
/usr/bin/php /var/www/artisan queue:listen \ | ||
--tries=4 \ | ||
--sleep=0 \ | ||
--timeout=300 \ | ||
--memory=128 |
Binary file not shown.