-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'subsetter_front' into develop_v2
- Loading branch information
Showing
14 changed files
with
133 additions
and
42 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
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 |
---|---|---|
@@ -1,24 +1,47 @@ | ||
# in order to get the required .env, context must be app/ | ||
# docker build -f app/frontend/Dockerfile app/ | ||
FROM node:20.9.0 as build-stage | ||
WORKDIR /tmp | ||
# WORKDIR /tmp | ||
# COPY *env* ./ | ||
# RUN [ -f ".env" ] || cp env.template .env | ||
# RUN grep '^VITE' .env > /.env | ||
|
||
WORKDIR /app | ||
COPY frontend/package.json ./ | ||
COPY frontend/package-lock.json ./ | ||
RUN npm install | ||
ADD frontend . | ||
RUN npm update | ||
RUN npm run build | ||
|
||
FROM nginx:1.24.0 as production-stage | ||
RUN mkdir /app | ||
COPY --from=build-stage /app/dist /app | ||
# COPY --from=build-stage .env .env | ||
COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf | ||
|
||
# Allow substitution of env vars at runtime | ||
COPY frontend/docker-entrypoint.sh / | ||
RUN chmod +x /docker-entrypoint.sh | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
EXPOSE 5003 | ||
# FROM nginx:1.24.0 as production-stage | ||
# RUN mkdir /app | ||
# COPY --from=build-stage /app/dist /app | ||
# # COPY --from=build-stage .env .env | ||
# COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf | ||
|
||
# # Allow substitution of env vars at runtime | ||
# COPY frontend/docker-entrypoint.sh / | ||
# RUN chmod +x /docker-entrypoint.sh | ||
# ENTRYPOINT ["/docker-entrypoint.sh"] | ||
# EXPOSE 5003 | ||
# CMD ["nginx" "-g" "daemon off;"] | ||
|
||
# Production layer | ||
FROM caddy:2.7.6-alpine as prod | ||
|
||
# Install envsubst command for replacing __env files | ||
# RUN set -x \ | ||
# && apk add gettext libintl | ||
|
||
COPY frontend/docker-entrypoint.sh /usr/local/bin/ | ||
|
||
# Copy config | ||
COPY frontend/caddy.docker.json /etc/caddy/caddy.json | ||
|
||
# Copy source dist | ||
COPY --from=build-stage /app/dist /srv | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] | ||
CMD ["caddy", "run", "--config", "/etc/caddy/caddy.json"] |
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,58 @@ | ||
{ | ||
"apps": | ||
{ | ||
"http": | ||
{ | ||
"servers": | ||
{ | ||
"web": | ||
{ | ||
"automatic_https": | ||
{ | ||
"disable": true | ||
}, | ||
"listen": | ||
[ | ||
":8080" | ||
], | ||
"routes": | ||
[ | ||
{ | ||
"handle": | ||
[ | ||
{ | ||
"handler": "file_server", | ||
"root": "/srv" | ||
} | ||
], | ||
"match": | ||
[ | ||
{ | ||
"path_regexp": | ||
{ | ||
"name": "asset", | ||
"pattern": "\\.(br|css|gz|ico|jpg|js|mp3|mp4|png|svg)$" | ||
} | ||
} | ||
], | ||
"terminal": true | ||
}, | ||
{ | ||
"handle": | ||
[ | ||
{ | ||
"handler": "rewrite", | ||
"uri": "/index.html" | ||
}, | ||
{ | ||
"handler": "file_server", | ||
"root": "/srv" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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
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
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
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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<template> | ||
<ModelSelectDrawer :show="showModelSelect" @toggle="showModelSelect = !showModelSelect" /> | ||
<SubmitButton /> | ||
<TheLeafletMap></TheLeafletMap> | ||
<!-- Actual map component included in base App.vue to allow persistence --> | ||
</template> | ||
|
||
<script setup> | ||
import { ref } from 'vue' | ||
import { ref } from 'vue'; | ||
import ModelSelectDrawer from '../components/ModelSelectDrawer.vue'; | ||
import TheLeafletMap from '../components/TheLeafletMap.vue'; | ||
import SubmitButton from '../components/SubmitButton.vue'; | ||
const showModelSelect = ref(true) | ||
import { useModelsStore } from '@/stores/models' | ||
const modelsStore = useModelsStore(); | ||
const showModelSelect = ref(modelsStore.selectedModel.value == null) | ||
</script> |