Skip to content

Commit

Permalink
Merge pull request #1 from phoenix741/feature/vuecli3
Browse files Browse the repository at this point in the history
Got to vue-cli 3
  • Loading branch information
phoenix741 authored Nov 14, 2018
2 parents acba877 + ba40145 commit bcb6ed5
Show file tree
Hide file tree
Showing 260 changed files with 18,236 additions and 22,452 deletions.
27 changes: 0 additions & 27 deletions .babelrc

This file was deleted.

9 changes: 3 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
.idea
bower_components
mongodb
node_modules
.directory
.dockerignore
.drone.yml
.editorconfig
.env
.eslintignore
.eslintrc.json
.hgflow
.hgignore
docker-compose*
Dockerfile*
Makefile
dist
37 changes: 20 additions & 17 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,48 @@
pipeline:
e2e:
group: test
image: node:8
image: node:10
commands:
- npm install
- npm run e2e:docker
- cp nightwatch.e2e.json nightwatch.json
- npm run test:e2e
environment:
- MONGODB_HOST=mongodb://mongodb:27017/passprotect
- MONGODB_DATABASE=passprotect
- HOST=e2e
- PROXY_GRAPHQL_SERVER=http://nodejs:4000
- VUE_APP_PIWIK_ENABLED=false
- VUE_APP_GRAPHQL_HTTP=http://nodejs:4000
- VUE_APP_GRAPHQL_WS=ws://nodejs:4000
- VUE_E2E_SERVER_URL=http://e2e:8080

unit:
group: test
image: node:8
image: node:10
commands:
- wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
- sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list'
- apt update && apt install -y google-chrome-stable

- npm install
- npm run unit

nodejs:
group: build
image: plugins/docker
repo: phoenix741/passprotect-server
secrets: [ docker_username, docker_password ]
tags: develop
dockerfile: Dockerfile.nodejs
# - npm run test:unit

nginx:
group: build
image: plugins/docker
repo: phoenix741/passprotect-client
secrets: [ docker_username, docker_password ]
tags: develop
dockerfile: Dockerfile.nginx
dockerfile: Dockerfile

services:
nodejs:
image: phoenix741/passprotect-server:develop
environment:
- MONGODB_HOST=mongodb://mongodb:27017/passprotect
- MONGODB_DATABASE=passprotect
- NODE_ENV=production
- DEBUG=App:*

selenium:
image: selenium/standalone-chrome

mongodb:
image: mongo:3.6
image: mongo:4
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false
trim_trailing_whitespace = false
11 changes: 11 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
VUE_APP_PIWIK_ENABLED=true
VUE_APP_PIWIK_SITE_URL=https://stats.shadoware.org/
VUE_APP_PIWIK_SITE_ID=36

VUE_APP_I18N_LOCALE=fr
VUE_APP_I18N_FALLBACK_LOCALE=en

#VUE_APP_GRAPHQL_HTTP=https://passprotect.shadoware.org/api/graphql
#VUE_APP_GRAPHQL_WS=wss://passprotect.shadoware.org/api/graphql
VUE_APP_GRAPHQL_HTTP=http://localhost:4000/
VUE_APP_GRAPHQL_WS=ws://localhost:4000/
6 changes: 1 addition & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
/build/
/config/
/dist/
/*.js
/test/unit/coverage/
*.gql
25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

28 changes: 17 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
.DS_Store
node_modules/
/www/
node_modules
/dist

/tests/e2e/reports/
selenium-debug.log

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/test/unit/coverage/
/test/e2e/reports/
selenium-debug.log

# Editor directories and files
.idea
Expand All @@ -15,10 +21,10 @@ selenium-debug.log
*.ntvs*
*.njsproj
*.sln
*.sw*

doc
mongodb
.nyc_output
.esm-cache
platforms/
plugins/
# Cordova
/src-cordova/www
/src-cordova/platforms
/src-cordova/plugins
/public/cordova.js
10 changes: 0 additions & 10 deletions .postcssrc.js

This file was deleted.

37 changes: 37 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#
# -------- Base ---------

FROM node:8-alpine as builder
LABEL MAINTAINER="Ulrich Van Den Hekke <ulrich.vdh@shadoware.org>"

WORKDIR /src
COPY package.json /src
RUN apk add --no-cache make gcc g++ python git
RUN npm install

ENV NODE_ENV=production

ENV VUE_APP_PIWIK_ENABLED=true
ENV VUE_APP_PIWIK_SITE_URL='${PIWIK_SITE_URL}'
ENV VUE_APP_PIWIK_SITE_ID='${PIWIK_SITE_ID}'

ENV VUE_APP_I18N_LOCALE=fr
ENV VUE_APP_I18N_FALLBACK_LOCALE=en

ENV VUE_APP_GRAPHQL_HTTP_ENDPOINT='https://${GRAPHQL_SERVER}'
ENV VUE_APP_GRAPHQL_WS='wss://${GRAPHQL_SERVER}'

COPY . .
RUN npm run build -- --modern

#
# -------- Dist -----------
FROM nginx:alpine as final
LABEL MAINTAINER="Ulrich Van Den Hekke <ulrich.vdh@shadoware.org>"

COPY src-docker/nginx/default.conf /etc/nginx/conf.d/default.conf

COPY --from=builder /src/dist /usr/share/nginx/html
COPY --from=builder /src/dist /usr/share/nginx/html.template

CMD ["/bin/sh", "-c", "cd /usr/share/nginx/html.template && for f in $(find ./ -type f); do envsubst '${PIWIK_SITE_URL} ${PIWIK_SITE_ID} ${GRAPHQL_SERVER}' < $f > \"/usr/share/nginx/html/$f\"; done && nginx -g 'daemon off;'"]
31 changes: 0 additions & 31 deletions Dockerfile.nginx

This file was deleted.

31 changes: 0 additions & 31 deletions Dockerfile.nodejs

This file was deleted.

21 changes: 0 additions & 21 deletions LICENCE

This file was deleted.

Loading

0 comments on commit bcb6ed5

Please sign in to comment.