Commit 4e7aafb3 authored by zhanhua kuang's avatar zhanhua kuang

rebase nginx to mount cert files

parent c9727667
......@@ -71,18 +71,20 @@ services:
networks:
- ego
nginx:
image: nginx:latest
build: ./nginx
image: gzego/nginx:latest
container_name: ego-nginx
volumes:
- ./www:/usr/share/nginx/html:ro
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./certifications:/etc/nginx/cert:ro
links:
- carbinet_production:carbinet
- sso_production:sso
networks:
- ego
ports:
- "8080:80"
- "443:443"
networks:
ego:
......@@ -90,4 +92,5 @@ networks:
volumes:
www:
nginx.conf:
\ No newline at end of file
nginx.conf:
certifications:
......@@ -43,11 +43,14 @@ http {
server {
# use 'listen 80 deferred;' for Linux
# use 'listen 80 accept_filter=httpready;' for FreeBSD
listen 80;
listen 443;
client_max_body_size 4G;
# ssl_certificate /etc/nginx/cert/sso.gzncloud.com_chain.crt;
# ssl_certificate_key /etc/nginx/cert/sso.gzncloud.com.key;
# set the correct host(s) for your site
server_name sso.gzego.com;
server_name sso.gzncloud.com;
keepalive_timeout 5;
# path for static files
......@@ -76,9 +79,11 @@ http {
}
server {
listen 80;
server_name carbinet.gzego.com;
listen 443;
server_name ziti.gzncloud.com;
# ssl_certificate /etc/nginx/cert/ziti.gzncloud.com.pem;
# ssl_certificate_key /etc/nginx/cert/ziti.gzncloud.com.key;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
root /usr/share/nginx/html/carbinet;
......@@ -134,4 +139,4 @@ http {
# deny all;
#}
}
}
\ No newline at end of file
}
FROM nginx:latest
RUN mkdir -p /etc/nginx/cert
VOLUME ["/etc/nginx/cert"]
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