fix combined image
This commit is contained in:
parent
3ad5c4e86b
commit
4537b35c6b
@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- fix problem with node-prune on production build
|
- fix problem with node-prune on production build
|
||||||
- variable names in examples (https://github.com/ohmyform/ohmyform/issues/134)
|
- variable names in examples (https://github.com/ohmyform/ohmyform/issues/134)
|
||||||
- error if /run/nginx already exists (https://github.com/ohmyform/ohmyform/pull/148)
|
- error if /run/nginx already exists (https://github.com/ohmyform/ohmyform/pull/148)
|
||||||
|
- fix combine images
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
|
|||||||
@ -67,7 +67,7 @@ EXPOSE 3000
|
|||||||
RUN mkdir -p /run/nginx/
|
RUN mkdir -p /run/nginx/
|
||||||
RUN touch /usr/src/supervisord.log && chmod 777 /usr/src/supervisord.log
|
RUN touch /usr/src/supervisord.log && chmod 777 /usr/src/supervisord.log
|
||||||
COPY supervisord.conf /etc/supervisord.conf
|
COPY supervisord.conf /etc/supervisord.conf
|
||||||
COPY nginx.conf /etc/nginx/conf.d/ohmyform.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
||||||
# CMD [ "yarn", "start:prod" ]
|
# CMD [ "yarn", "start:prod" ]
|
||||||
|
|||||||
61
nginx.conf
61
nginx.conf
@ -1,15 +1,54 @@
|
|||||||
server {
|
user nginx;
|
||||||
listen 3000;
|
worker_processes 1;
|
||||||
|
error_log /dev/stderr debug;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
location / {
|
events {
|
||||||
proxy_pass http://localhost:4000;
|
worker_connections 1024;
|
||||||
proxy_redirect off;
|
}
|
||||||
proxy_set_header Host $host;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /graphql {
|
http {
|
||||||
proxy_pass http://localhost:4100;
|
log_format json_combined escape=json
|
||||||
proxy_redirect off;
|
'{'
|
||||||
proxy_set_header Host $host;
|
'"time_local":"$time_local",'
|
||||||
|
'"remote_addr":"$remote_addr",'
|
||||||
|
'"remote_user":"$remote_user",'
|
||||||
|
'"request":"$request",'
|
||||||
|
'"status": "$status",'
|
||||||
|
'"body_bytes_sent":"$body_bytes_sent",'
|
||||||
|
'"request_time":"$request_time",'
|
||||||
|
'"http_referrer":"$http_referer",'
|
||||||
|
'"http_user_agent":"$http_user_agent"'
|
||||||
|
'}';
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log json_combined;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 3000;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://localhost:4000;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /graphql {
|
||||||
|
proxy_pass http://localhost:4100;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
# WebSocket support
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user