-
Notifications
You must be signed in to change notification settings - Fork 0
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 #74 from ZeusWPI/todo/docker
Add improved docker setup
- Loading branch information
Showing
17 changed files
with
112 additions
and
155 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM node:lts-alpine as build-stage | ||
|
||
# Make the 'app' folder the current working directory | ||
WORKDIR /app | ||
|
||
# Add `/app/node_modules/.bin` to $PATH | ||
ENV PATH /app/node_modules/.bin:$PATH | ||
|
||
# Copy package json | ||
COPY package.json /app/package.json | ||
|
||
# Install project dependencies | ||
RUN yarn install | ||
|
||
# Start development server | ||
CMD ["yarn", "dev"] |
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,34 @@ | ||
############################ | ||
# Build stage | ||
############################ | ||
FROM node:lts-alpine as build-stage | ||
|
||
# Environment | ||
ENV NODE_ENV=production \ | ||
VUE_APP_BACKEND_URL=https://g2-api.zeus.gent \ | ||
VUE_APP_ROUTER_MODE=hash | ||
|
||
# Make the 'app' folder the current working directory | ||
WORKDIR /app | ||
|
||
# Copy project files and folders to the current working directory (i.e. 'app' folder) | ||
COPY . . | ||
|
||
# Install project dependencies | ||
RUN yarn install --production=false | ||
|
||
# Build app for production with minification | ||
RUN yarn build | ||
|
||
############################ | ||
# Production stage | ||
############################ | ||
FROM nginx:stable-alpine as production-stage | ||
|
||
# Copy the files from the build stage to the production stage | ||
COPY --from=build-stage /app/dist /usr/share/nginx/html | ||
|
||
# Expose ports | ||
EXPOSE 80 | ||
|
||
CMD ["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,13 @@ | ||
version: "3.7" | ||
|
||
services: | ||
g2-frontend: | ||
container_name: g2-frontend | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.dev | ||
volumes: | ||
- ".:/app" | ||
- "/app/node_modules" | ||
ports: | ||
- "8080:8080" |
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 @@ | ||
version: "3.7" | ||
|
||
services: | ||
g2-frontend-prod: | ||
container_name: g2-frontend-prod | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.prod | ||
ports: | ||
- "4201:80" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
This file was deleted.
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
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,31 +1,25 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "esnext", | ||
"strict": true, | ||
"jsx": "preserve", | ||
"importHelpers": true, | ||
"moduleResolution": "node", | ||
"experimentalDecorators": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strictPropertyInitialization": false, | ||
"resolveJsonModule": true, | ||
"allowJs": true, | ||
"sourceMap": true, | ||
"baseUrl": ".", | ||
"types": ["webpack-env", "vuetify"], | ||
"paths": { | ||
"@/*": ["src/*"] | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "esnext", | ||
"strict": true, | ||
"jsx": "preserve", | ||
"importHelpers": true, | ||
"moduleResolution": "node", | ||
"experimentalDecorators": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strictPropertyInitialization": false, | ||
"resolveJsonModule": true, | ||
"allowJs": true, | ||
"sourceMap": true, | ||
"baseUrl": ".", | ||
"types": ["webpack-env", "vuetify"], | ||
"paths": { | ||
"@/*": ["src/*"] | ||
}, | ||
"lib": ["esnext", "dom", "dom.iterable", "scripthost"] | ||
}, | ||
"lib": ["esnext", "dom", "dom.iterable", "scripthost"] | ||
}, | ||
"include": [ | ||
"src/**/*.ts", | ||
"src/**/*.tsx", | ||
"src/**/*.vue", | ||
"tests/**/*.ts", | ||
"tests/**/*.tsx" | ||
], | ||
"exclude": ["node_modules"] | ||
} | ||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx"], | ||
"exclude": ["node_modules"] | ||
} |
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,4 +1,16 @@ | ||
/* eslint-disable */ | ||
module.exports = { | ||
publicPath: process.env.VUE_APP_PUBLIC_PATH ? process.env.VUE_APP_PUBLIC_PATH : "", | ||
productionSourceMap: process.env.VUE_APP_SOURCEMAP ? Boolean(process.env.VUE_APP_SOURCEMAP) : false | ||
publicPath: process.env.VUE_APP_PUBLIC_PATH || "", | ||
productionSourceMap: process.env.VUE_APP_SOURCEMAP === "true", | ||
|
||
/** | ||
* Transpile certain dependencies from ES6 to lower ES versions | ||
* for older browser support (eg: IE11, Safari 9) | ||
*/ | ||
transpileDependencies: ["vuetify"], | ||
|
||
/** | ||
* Prevent error on compilation when ESLint found errors/warnings. | ||
*/ | ||
lintOnSave: "warning" | ||
}; |