Fixed dockerfile

This commit is contained in:
Thomas
2021-01-28 18:47:56 +01:00
parent c66cc42118
commit 5d13cb900e
3 changed files with 7 additions and 3 deletions

View File

@@ -9,7 +9,9 @@ COPY server/ ./server/
RUN cd server && npm install && npm run build
FROM node:latest AS serve
WORKDIR /root/
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install --only=production
COPY --from=server-build /usr/src/app/server/dist ./distServer
COPY --from=client-build /usr/src/app/client/dist ./distClient
CMD ["node", "./distServer/app.js"]

View File

@@ -5,6 +5,7 @@
<h2 class="title">Score: {{player.score}}</h2>
<h3 class="subtitle">Best score: {{player.bestScore}}</h3>
<b-button @click="respawn">Respawn</b-button>
<b-button @click="quit">Quit</b-button>
</b-modal>
<canvas
class="game-canvas"
@@ -16,7 +17,6 @@
<script>
import { send } from '@/store/socketPlugin'
import { render } from '@/game/render.js'
// import { update } from '@/game/update.js'
import { sound } from '@/game/sound.js'
export default {
@@ -169,6 +169,9 @@ export default {
},
respawn () {
send({ type: 'respawn' })
},
quit () {
}
}
}

View File

@@ -16,7 +16,6 @@
"author": "gltron",
"license": "ISC",
"dependencies": {
"dotenv": "^8.2.0",
"express": "^4.17.1",
"uuid": "^8.3.1",
"ws": "^7.3.1"