Commit c10d9f8a authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

added Dockerfile

parent 61076962
FROM alpine:3.11.3
RUN apk add --update \
nginx \
tzdata \
ca-certificates \
&& rm -rf /var/cache/apk/*
WORKDIR /html
RUN ln -s /dev/null /var/log/nginx/access.log && \
ln -s /dev/stdout /var/log/nginx/error.log && \
cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime && \
echo "Europe/Berlin" > /etc/timezone && \
(crontab -l ; echo "* * * * * php /html/artisan schedule:run >> /dev/null 2>&1") | crontab -
WORKDIR /html
EXPOSE 80
COPY . /html
COPY config/nginx.conf /etc/nginx/nginx.conf
COPY config/nginx-default.conf /etc/nginx/conf.d/default.conf
CMD nginx
\ No newline at end of file
server {
listen 80;
server_name localhost;
root /html;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
location ~ /\.ht {
deny all;
}
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
\ No newline at end of file
user nginx;
worker_processes 100;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
daemon off;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_tokens off;
log_format main '[$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
gzip on;
include /etc/nginx/conf.d/*.conf;
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment