Skip to content

Commit

Permalink
Merge pull request #172 from scottbasgaard/metocean-poc
Browse files Browse the repository at this point in the history
chore: metocean initial commit
  • Loading branch information
florislangeraert authored Feb 8, 2024
2 parents b793cdf + 42ba8c3 commit dd3ac48
Show file tree
Hide file tree
Showing 20 changed files with 182,639 additions and 106 deletions.
25 changes: 25 additions & 0 deletions Dockerfile
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;"]
10 changes: 10 additions & 0 deletions nginx.conf
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;
}
}
152 changes: 69 additions & 83 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@turf/turf": "^6.3.0",
"@vue/composition-api": "^1.0.0-rc.7",
"core-js": "^3.6.5",
"echarts": "^5.1.0",
"echarts": "^5.4.3",
"file-saver": "^2.0.5",
"mapbox-gl": "^2.15.0",
"marked": "^2.0.3",
Expand All @@ -25,13 +25,13 @@
"register-service-worker": "^1.7.1",
"tiny-cookie": "^2.3.2",
"vue": "^2.6.11",
"vue-echarts": "^6.0.0-rc.4",
"vue-echarts": "^6.6.1",
"vue-gtag": "^1.16.1",
"vue-router": "^3.2.0",
"vue-tour": "^2.0.0",
"vue2mapbox-gl": "^0.15.0",
"vuelidate": "^0.7.6",
"vuetify": "^2.4.0",
"vuetify": "^2.7.1",
"vuex": "^3.4.0",
"zarr": "^0.5.1",
"zarr-js": "^2.2.1"
Expand Down
Loading

0 comments on commit dd3ac48

Please sign in to comment.