-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM node:16-alpine as base | ||
USER node | ||
WORKDIR /app | ||
COPY --chown=node:node AllNeededDirectories/bicycle-osm-app/package.json AllNeededDirectories/bicycle-osm-app/package-lock.json ./ | ||
RUN npm install | ||
COPY --chown=node:node ./AllNeededDirectories/bicycle-osm-app/ ./ | ||
CMD ["npm", "start"] | ||
|
||
FROM base as build | ||
RUN yarn build | ||
|
||
|
||
FROM nginx:stable-alpine | ||
COPY --from=build /app/dist /usr/share/nginx/html | ||
COPY docker/nginx/nginx.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
server { | ||
|
||
listen 80; | ||
resolver 127.0.0.11; | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
|
||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
|
||
client_max_body_size 300m; | ||
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; | ||
proxy_set_header X-NginX-Proxy true; | ||
proxy_set_header Host $http_host; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Cookie $http_cookie; | ||
proxy_redirect off; | ||
|
||
location /pbfFiles/ { | ||
alias /mnt/volumes/pbfFiles/; | ||
|
||
location ~* \.(?:html|js|jpg|jpeg|gif|png|css|tgz|gz|rar|bz2|doc|pdf|ppt|tar|wav|bmp|ttf|rtf|swf|ico|flv|txt|woff|woff2|svg|xml|pbf|geojson)$ { | ||
gzip_static always; | ||
expires 30d; | ||
access_log off; | ||
add_header Pragma "public"; | ||
add_header Cache-Control "max-age=31536000, public"; | ||
} | ||
} | ||
|
||
location / { | ||
proxy_pass http://web:8080; | ||
} | ||
} |