-
Notifications
You must be signed in to change notification settings - Fork 1
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
24 changed files
with
2,081 additions
and
1,961 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,3 @@ | ||
node_modules | ||
/public/config.json | ||
/Dockerfile |
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,20 +1,20 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true | ||
node: true, | ||
}, | ||
extends: [ | ||
"plugin:vue/vue3-essential", | ||
"eslint:recommended", | ||
"@vue/typescript/recommended", | ||
"@vue/prettier", | ||
"@vue/prettier/@typescript-eslint" | ||
"@vue/prettier/@typescript-eslint", | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2020 | ||
ecmaVersion: 2020, | ||
}, | ||
rules: { | ||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off", | ||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off" | ||
} | ||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
/public/config.json | ||
|
||
# local env files | ||
.env.local | ||
|
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,22 +1,25 @@ | ||
FROM node:14 | ||
|
||
# Working Node.js 14 base image | ||
FROM node:14 AS nodebase | ||
RUN mkdir -p /home/node/.npm /app/ && \ | ||
chown -R node:node /home/node/ /app/ | ||
USER node | ||
RUN mkdir -p /home/node/.npm-global \ | ||
/home/node/waarzitjenu/map \ | ||
/home/node/waarzitjenu/map/dist | ||
|
||
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global | ||
ENV NPM_CONFIG_PREFIX=/home/node/.npm | ||
ENV PATH=$NPM_CONFIG_PREFIX/bin:$PATH | ||
RUN npm -g config set user "$USER" && \ | ||
npm i -g yarn && \ | ||
printf "Node version %s, npm version %s, yarn version %s\n\n" "$(node -v)" "$(npm -v)" "$(yarn -v)" | ||
|
||
WORKDIR /home/node/waarzitjenu/map | ||
COPY ["package.json", "yarn.lock", "babel.config.js", "tsconfig.json", "vue.config.js", ".browserslistrc", ".env", ".env.local", ".eslintrc.js", "./"] | ||
COPY ["public/", "./public/"] | ||
COPY ["src/", "./src/"] | ||
|
||
# Builder | ||
FROM nodebase AS builder | ||
WORKDIR /app/ | ||
RUN mkdir -p map/ map/dist/ | ||
WORKDIR /app/map | ||
COPY ./ ./ | ||
RUN yarn install | ||
RUN yarn build | ||
|
||
ENTRYPOINT ["yarn", "run"] | ||
CMD ["build"] | ||
# Nginx | ||
FROM nginx:1.20-alpine | ||
COPY --from=builder /app/map/dist /usr/share/nginx/html | ||
COPY ./docker-entrypoint.sh /docker-entrypoint.sh | ||
ENTRYPOINT ["/docker-entrypoint.sh"] |
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,3 +1,3 @@ | ||
module.exports = { | ||
presets: ["@vue/cli-plugin-babel/preset"] | ||
presets: ["@vue/cli-plugin-babel/preset"], | ||
}; |
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,5 @@ | ||
#!/bin/sh | ||
ROOT_DIR=/usr/share/nginx/html | ||
envsubst < "$ROOT_DIR/config.template.json" > "$ROOT_DIR/config.json" | ||
|
||
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
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,4 @@ | ||
{ | ||
"MAPBOX_ACCESS_TOKEN": "${MAPBOX_ACCESS_TOKEN}", | ||
"LOCATION_API_ENDPOINT": "${LOCATION_API_ENDPOINT}" | ||
} |
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
Oops, something went wrong.