Fixed dockerfile
This commit is contained in:
@@ -9,7 +9,9 @@ COPY server/ ./server/
|
|||||||
RUN cd server && npm install && npm run build
|
RUN cd server && npm install && npm run build
|
||||||
|
|
||||||
FROM node:latest AS serve
|
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=server-build /usr/src/app/server/dist ./distServer
|
||||||
COPY --from=client-build /usr/src/app/client/dist ./distClient
|
COPY --from=client-build /usr/src/app/client/dist ./distClient
|
||||||
CMD ["node", "./distServer/app.js"]
|
CMD ["node", "./distServer/app.js"]
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<h2 class="title">Score: {{player.score}}</h2>
|
<h2 class="title">Score: {{player.score}}</h2>
|
||||||
<h3 class="subtitle">Best score: {{player.bestScore}}</h3>
|
<h3 class="subtitle">Best score: {{player.bestScore}}</h3>
|
||||||
<b-button @click="respawn">Respawn</b-button>
|
<b-button @click="respawn">Respawn</b-button>
|
||||||
|
<b-button @click="quit">Quit</b-button>
|
||||||
</b-modal>
|
</b-modal>
|
||||||
<canvas
|
<canvas
|
||||||
class="game-canvas"
|
class="game-canvas"
|
||||||
@@ -16,7 +17,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { send } from '@/store/socketPlugin'
|
import { send } from '@/store/socketPlugin'
|
||||||
import { render } from '@/game/render.js'
|
import { render } from '@/game/render.js'
|
||||||
// import { update } from '@/game/update.js'
|
|
||||||
import { sound } from '@/game/sound.js'
|
import { sound } from '@/game/sound.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -169,6 +169,9 @@ export default {
|
|||||||
},
|
},
|
||||||
respawn () {
|
respawn () {
|
||||||
send({ type: 'respawn' })
|
send({ type: 'respawn' })
|
||||||
|
},
|
||||||
|
quit () {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
"author": "gltron",
|
"author": "gltron",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dotenv": "^8.2.0",
|
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"uuid": "^8.3.1",
|
"uuid": "^8.3.1",
|
||||||
"ws": "^7.3.1"
|
"ws": "^7.3.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user