Skip to content

Commit

Permalink
Add Docker stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoGresse committed Apr 30, 2023
1 parent e052959 commit 6f8e59e
Show file tree
Hide file tree
Showing 65 changed files with 97 additions and 57,598 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# production
/build
/dist
/lib

# misc
*~
Expand Down
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ARG node_version=18-alpine

FROM node:${node_version} AS build

WORKDIR /app

COPY . .

RUN npm ci && npm run build:server

FROM node:${node_version}

RUN apk update && apk upgrade

WORKDIR /app
USER node

COPY --from=build /app/package.json .
COPY --from=build /app/package-lock.json .
COPY --from=build /app/lib ./lib
COPY --from=build /app/node_modules ./node_modules

ENV PATH /app/node_modules/.bin:$PATH

CMD ["npm", "run", "start:server"]
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: '3'
services:
bataille-server:
container_name: bataille-server
build: .
55,111 changes: 0 additions & 55,111 deletions lib/public/assets/tilemaps/json/map.json

This file was deleted.

18 changes: 0 additions & 18 deletions lib/src/common/GameSettings.js

This file was deleted.

2 changes: 0 additions & 2 deletions lib/src/common/NewUnitDataEvent.js

This file was deleted.

37 changes: 0 additions & 37 deletions lib/src/common/SOCKET_EMIT.js

This file was deleted.

20 changes: 0 additions & 20 deletions lib/src/common/TileType.js

This file was deleted.

21 changes: 0 additions & 21 deletions lib/src/common/UNITS.js

This file was deleted.

60 changes: 0 additions & 60 deletions lib/src/common/UnitAction.js

This file was deleted.

149 changes: 0 additions & 149 deletions lib/src/server/Game.js

This file was deleted.

Loading

0 comments on commit 6f8e59e

Please sign in to comment.