-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from scottbasgaard/metocean-poc
chore: metocean initial commit
- Loading branch information
Showing
20 changed files
with
182,639 additions
and
106 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Multi-stage | ||
# 1) Node image for building frontend assets | ||
# 2) nginx stage to serve frontend assets | ||
|
||
# Name the node stage "builder" | ||
FROM node:16 AS builder | ||
# Set working directory | ||
WORKDIR /app | ||
# Copy all files from current directory to working dir in image | ||
COPY . . | ||
# install node modules and build assets | ||
RUN npm install && npm run build | ||
|
||
# nginx state for serving content | ||
FROM nginx:alpine | ||
# Set working directory to nginx asset directory | ||
WORKDIR /usr/share/nginx/html | ||
# Remove default nginx static assets | ||
RUN rm -rf ./* | ||
# Copy static assets from builder stage | ||
COPY --from=builder /app/dist . | ||
# Add a custom nginx configuration that handles URL rewrites | ||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
# Containers run nginx with global directives and daemon off | ||
ENTRYPOINT ["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,10 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.