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

rebase nginx to mount cert files

parent c9727667
...@@ -71,18 +71,20 @@ services: ...@@ -71,18 +71,20 @@ services:
networks: networks:
- ego - ego
nginx: nginx:
image: nginx:latest build: ./nginx
image: gzego/nginx:latest
container_name: ego-nginx container_name: ego-nginx
volumes: volumes:
- ./www:/usr/share/nginx/html:ro - ./www:/usr/share/nginx/html:ro
- ./nginx.conf:/etc/nginx/nginx.conf:ro - ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./certifications:/etc/nginx/cert:ro
links: links:
- carbinet_production:carbinet - carbinet_production:carbinet
- sso_production:sso - sso_production:sso
networks: networks:
- ego - ego
ports: ports:
- "8080:80" - "443:443"
networks: networks:
ego: ego:
...@@ -91,3 +93,4 @@ networks: ...@@ -91,3 +93,4 @@ networks:
volumes: volumes:
www: www:
nginx.conf: nginx.conf:
certifications:
...@@ -43,11 +43,14 @@ http { ...@@ -43,11 +43,14 @@ http {
server { server {
# use 'listen 80 deferred;' for Linux # use 'listen 80 deferred;' for Linux
# use 'listen 80 accept_filter=httpready;' for FreeBSD # use 'listen 80 accept_filter=httpready;' for FreeBSD
listen 80; listen 443;
client_max_body_size 4G; 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 # set the correct host(s) for your site
server_name sso.gzego.com; server_name sso.gzncloud.com;
keepalive_timeout 5; keepalive_timeout 5;
# path for static files # path for static files
...@@ -76,9 +79,11 @@ http { ...@@ -76,9 +79,11 @@ http {
} }
server { server {
listen 80; listen 443;
server_name carbinet.gzego.com; 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; #charset koi8-r;
#access_log /var/log/nginx/host.access.log main; #access_log /var/log/nginx/host.access.log main;
root /usr/share/nginx/html/carbinet; root /usr/share/nginx/html/carbinet;
......
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