Commit 66b763b5 authored by NaveenKJ's avatar NaveenKJ
Browse files

Code files added

parent edef61db
#
# The default server
#
server {
listen 80 default_server;
server_name _;
root /var/www/html;
#charset koi8-r;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log;
location / {
index index.html index.htm index.php;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# 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;
}
location ~ /\.ht {
deny all;
}
}
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes 1;
daemon off;
error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$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 0;
keepalive_timeout 65;
#gzip on;
index index.html index.htm;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
}
\ No newline at end of file
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=5MB ; (max main logfile bytes b4 rotation;default 50MB)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
user=root
nodaemon=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
[rpcinterface:supervisor]
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
[program:start]
command=/script/start.sh
autostart=true
autorestart=false
startsecs=1
startretries=0
redirect_stderr=false
redirect_stderr=false
[program:nginx]
command=/usr/sbin/nginx
autostart=true
stdout_events_enabled=true
stderr_events_enabled=true
\ No newline at end of file
#!/bin/sh
hostname=`hostname -f`
sed -i "s/XXX/${hostname}/" /var/www/html/index.html
\ No newline at end of file
# Example Dockerfile showing ENTRYPOINT
FROM alpine:latest
MAINTAINER Russ McKendrick <russ@mckendrick.io>
RUN apk add --update supervisor nginx && rm -rf /var/cache/apk/*
COPY start.sh /script/
COPY files/default.conf /etc/nginx/conf.d/
COPY files/nginx.conf /etc/nginx/nginx.conf
COPY files/supervisord.conf /etc/supervisord.conf
ADD webroot.tar /
RUN chown -R nginx:nginx /var/www/html
EXPOSE 80/tcp
ENTRYPOINT ["supervisord"]
\ No newline at end of file
#
# The default server
#
server {
listen 80 default_server;
server_name _;
root /var/www/html;
#charset koi8-r;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log;
location / {
index index.html index.htm index.php;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# 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;
}
location ~ /\.ht {
deny all;
}
}
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes 1;
daemon off;
error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$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 0;
keepalive_timeout 65;
#gzip on;
index index.html index.htm;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
}
\ No newline at end of file
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=5MB ; (max main logfile bytes b4 rotation;default 50MB)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
user=root
nodaemon=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
[rpcinterface:supervisor]
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
[program:start]
command=/script/start.sh
autostart=true
autorestart=false
startsecs=1
startretries=0
redirect_stderr=false
redirect_stderr=false
[program:nginx]
command=/usr/sbin/nginx
autostart=true
stdout_events_enabled=true
stderr_events_enabled=true
\ No newline at end of file
#!/bin/sh
hostname=`hostname -f`
sed -i "s/XXX/${hostname}/" /var/www/html/index.html
\ No newline at end of file
# Example Dockerfile showing CMD
FROM alpine:latest
MAINTAINER Russ McKendrick <russ@mckendrick.io>
RUN apk add --update supervisor nginx && rm -rf /var/cache/apk/*
COPY start.sh /script/
COPY files/default.conf /etc/nginx/conf.d/
COPY files/nginx.conf /etc/nginx/nginx.conf
COPY files/supervisord.conf /etc/supervisord.conf
ADD webroot.tar /
RUN chown -R nginx:nginx /var/www/html
EXPOSE 80/tcp
ENTRYPOINT ["supervisord"]
CMD ["-c","/etc/supervisord.conf"]
\ No newline at end of file
#
# The default server
#
server {
listen 80 default_server;
server_name _;
root /var/www/html;
#charset koi8-r;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log;
location / {
index index.html index.htm index.php;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# 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;
}
location ~ /\.ht {
deny all;
}
}
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes 1;
daemon off;
error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$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 0;
keepalive_timeout 65;
#gzip on;
index index.html index.htm;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
}
\ No newline at end of file
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=5MB ; (max main logfile bytes b4 rotation;default 50MB)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
user=root
nodaemon=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
[rpcinterface:supervisor]
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
[program:start]
command=/script/start.sh
autostart=true
autorestart=false
startsecs=1
startretries=0
redirect_stderr=false
redirect_stderr=false
[program:nginx]
command=/usr/sbin/nginx
autostart=true
stdout_events_enabled=true
stderr_events_enabled=true
\ No newline at end of file
#!/bin/sh
hostname=`hostname -f`
sed -i "s/XXX/${hostname}/" /var/www/html/index.html
\ No newline at end of file
# Example of a really bsaic Dockerfile
FROM alpine:latest
CMD echo Hello World!!
\ No newline at end of file
Markdown is supported
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