Dockerfile文件+nginx.conf文件+示例图片
7
Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM nginx:1.10
|
||||
COPY dist/ /usr/share/nginx/html/
|
||||
COPY nginx.conf /etc/nginx
|
||||
RUN true
|
||||
VOLUME /mydata/nginx/conf:/etc/nginx
|
||||
VOLUME /mydata/nginx/html:/usr/share/nginx/html
|
||||
VOLUME /mydata/nginx/log:/var/log/nginx
|
BIN
doc/aliport.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
doc/build_docker_image_dir.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
doc/build_done.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
doc/building.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
doc/docker_run.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
doc/game1.png
Normal file
After Width: | Height: | Size: 232 KiB |
BIN
doc/game2.png
Normal file
After Width: | Height: | Size: 298 KiB |
45
nginx.conf
Normal file
@ -0,0 +1,45 @@
|
||||
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/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 65;
|
||||
|
||||
#gzip on;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
}
|