File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ # build stage
2+ FROM neo4jlabs/neodash:latest AS neodash
3+
4+ ENV NGINX_HTTPS_PORT=5443
5+
6+ USER root
7+
8+ RUN mkdir -p /etc/nginx/certs
9+
10+ RUN --mount=type=secret,id=NEODASH_SSL_KEY \
11+ base64 -d /run/secrets/NEODASH_SSL_KEY > /etc/nginx/certs/key.pem
12+
13+ RUN --mount=type=secret,id=NEODASH_SSL_CERT \
14+ base64 -d /run/secrets/NEODASH_SSL_CERT > /etc/nginx/certs/cert.pem
15+
16+ COPY default.conf /etc/nginx/templates/default.conf.template
17+ COPY default.conf /etc/nginx/conf.d/
18+
19+ RUN chown -R nginx:nginx /etc/nginx
20+
21+ USER nginx
22+ EXPOSE $NGINX_HTTPS_PORT
23+
24+ HEALTHCHECK CMD curl --fail "https://localhost:$NGINX_HTTPS_PORT" || exit 1
25+ LABEL version="1.0"
Original file line number Diff line number Diff line change 1+ server {
2+ listen ${NGINX_PORT};
3+ server_name localhost;
4+ include mime.types;
5+ location / {
6+ root /usr/share/nginx/html;
7+ try_files $uri $uri/ /index.html;
8+ index index.html index.htm;
9+ }
10+ # redirect server error pages to the static page /50x.html
11+ # Note: This is optional, depending on the implementation in React
12+ error_page 500 502 503 504 /50x.html;
13+ location = /50x.html {
14+ root /usr/share/nginx/html;
15+ }
16+ }
17+ server {
18+ listen 5443 ssl;
19+ ssl_certificate /etc/nginx/certs/cert.pem;
20+ ssl_certificate_key /etc/nginx/certs/key.pem;
21+ server_name localhost;
22+ include mime.types;
23+ location / {
24+ root /usr/share/nginx/html;
25+ try_files $uri $uri/ /index.html;
26+ index index.html index.htm;
27+ }
28+ # redirect server error pages to the static page /50x.html
29+ # Note: This is optional, depending on the implementation in React
30+ error_page 500 502 503 504 /50x.html;
31+ location = /50x.html {
32+ root /usr/share/nginx/html;
33+ }
34+ }
You can’t perform that action at this time.
0 commit comments