Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: metocean initial commit #172

Merged
merged 4 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading