moved some deps, started cleaning backend

This commit is contained in:
Jörn-Michael Miehe 2019-01-17 17:01:45 +01:00
parent 5e7868c8e8
commit a3fc829555
5 changed files with 40 additions and 52 deletions

View file

@ -1,4 +1,4 @@
FROM node:latest FROM node:latest as devStage
# some dir for our code # some dir for our code
WORKDIR /app WORKDIR /app
@ -9,8 +9,5 @@ EXPOSE 3000
COPY package*.json . COPY package*.json .
RUN yarn RUN yarn
# copy code
COPY . .
# this is how we start # this is how we start
CMD ["yarn", "start"] CMD ["yarn", "watch"]

View file

@ -10,7 +10,7 @@ fftcgdb = new FFTCGDB path.resolve(__dirname, '../fftcg.db')
# create router # create router
FFTCGROUTER = express.Router() FFTCGROUTER = express.Router()
FFTCGROUTER.use express.static path.resolve(__dirname, '../public_html') # FFTCGROUTER.use express.static path.resolve(__dirname, '../public_html')
# register user # register user
FFTCGROUTER.post '/register', (req, res) -> FFTCGROUTER.post '/register', (req, res) ->

View file

@ -1,6 +1,6 @@
{ {
"name": "node-fftcg", "name": "yvk-fftcg-backend",
"version": "0.0.3", "version": "0.1.0",
"description": "FFTCG online using Socket.IO and CraftyJS on Node.js on Docker", "description": "FFTCG online using Socket.IO and CraftyJS on Node.js on Docker",
"author": "JMM <jmm@yavook.de>", "author": "JMM <jmm@yavook.de>",
@ -10,36 +10,11 @@
"license": "UNLICENSED", "license": "UNLICENSED",
"scripts": { "scripts": {
"build": "webpack", "start": "coffee server.coffee",
"watch": "webpack --watch", "watch": "nodemon server.coffee",
"start": "webpack && coffee server.coffee",
"debug": "webpack --watch & nodemon server.coffee",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"devDependencies": {
"@babel/core": "^7.1.6",
"@babel/preset-env": "^7.1.6",
"coffee-loader": "^0.9.0",
"autoprefixer": "^9.3.1",
"css-loader": "^1.0.1",
"postcss-loader": "^3.0.0",
"node-sass": "^4.10.0",
"precss": "^3.1.2",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"nodemon": "^1.18.9",
"webpack": "^4.25.1",
"webpack-cli": "^3.1.2",
"bootstrap": "^4.1.3",
"craftyjs": "^0.9.0",
"jquery": "^3.3.1",
"popper.js": "^1.14.5"
},
"dependencies": { "dependencies": {
"bcrypt": "^3.0.2", "bcrypt": "^3.0.2",
"body-parser": "^1.18.3", "body-parser": "^1.18.3",
@ -49,9 +24,11 @@
"express-session": "^1.15.6", "express-session": "^1.15.6",
"express-socket.io-session": "^1.3.5", "express-socket.io-session": "^1.3.5",
"helmet": "^3.15.0", "helmet": "^3.15.0",
"pug": "^2.0.3",
"socket.io": "^2.2.0", "socket.io": "^2.2.0",
"socket.io-client": "^2.2.0",
"sqlite3": "^4.0.4" "sqlite3": "^4.0.4"
},
"devDependencies": {
"nodemon": "^1.18.9"
} }
} }

View file

@ -1,20 +1,18 @@
version: "2" version: "2"
services: services:
fftcg:
build: .
command: "yarn debug"
restart: "no"
volumes:
- "${PWD}/src:/app/src"
- "${PWD}/views:/app/views:ro"
- "${PWD}/public_html:/app/public_html"
- "${PWD}/inc:/app/inc:ro"
- "${PWD}/server.coffee:/app/server.coffee:ro"
# - "${PWD}/fftcg.db:/app/fftcg.db"
ports:
- "3000:3000"
redis: redis:
image: redis:alpine image: redis:alpine
restart: "no" restart: "no"
backend:
build:
context: ./backend
target: devStage
restart: "no"
volumes:
- "${PWD}/backend/inc:/app/inc:ro"
- "${PWD}/backend/server.coffee:/app/server.coffee:ro"
# - "${PWD}/backend/fftcg.db:/app/fftcg.db"
ports:
- "3000:3000"

View file

@ -1,22 +1,38 @@
{ {
"name": "frontend", "name": "yvk-fftcg-frontend",
"version": "0.1.0", "version": "0.1.0",
"description": "FFTCG online using Socket.IO and CraftyJS on Node.js on Docker",
"author": "JMM <jmm@yavook.de>",
"private": true, "private": true,
"license": "UNLICENSED",
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"vue": "^2.5.21" "vue": "^2.5.21"
}, },
"devDependencies": { "devDependencies": {
"craftyjs": "^0.9.0",
"bootstrap": "^4.1.3",
"jquery": "^3.3.1",
"popper.js": "^1.14.5",
"socket.io-client": "^2.2.0",
"@vue/cli-plugin-babel": "^3.3.0", "@vue/cli-plugin-babel": "^3.3.0",
"@vue/cli-plugin-eslint": "^3.3.0", "@vue/cli-plugin-eslint": "^3.3.0",
"@vue/cli-service": "^3.3.0", "@vue/cli-service": "^3.3.0",
"babel-eslint": "^10.0.1", "babel-eslint": "^10.0.1",
"eslint": "^5.8.0", "eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0", "eslint-plugin-vue": "^5.0.0",
"pug": "^2.0.3",
"pug-plain-loader": "^1.0.0",
"vue-template-compiler": "^2.5.21" "vue-template-compiler": "^2.5.21"
} }
} }