Skip to content

Commit 4bc557f

Browse files
authored
feat: set up Docker (2004Scape#192)
* feat: set up Docker only v1, doesn't have watcher atm also haven't added it to readme while it's still a WIP/under test * specify env vars in docker-compose
1 parent 68de6eb commit 4bc557f

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

.dockerignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.github/
2+
.vscode/
3+
docs/
4+
node_modules/
5+
dump/
6+
ref/
7+
8+
.env
9+
10+
.eslintignore
11+
.eslintrc.cjs
12+
13+
.gitattributes
14+
.gitignore
15+
16+
jest.config.ts
17+
18+
LICENSE
19+
20+
README.md
21+
22+
Dockerfile
23+
.dockerignore
24+
docker-compose.yml

Dockerfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM node:18
2+
3+
WORKDIR /app
4+
5+
RUN apt-get update && apt-get install -y openjdk-17-jre
6+
7+
COPY package*.json ./
8+
9+
RUN npm ci
10+
11+
# TODO consider using volumes/mounts for the source code + data
12+
COPY . .
13+
14+
EXPOSE 80
15+
EXPOSE 43594
16+
EXPOSE 43595
17+
18+
CMD ["npm", "start"]
19+
20+
# TODO add dev mode

docker-compose.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: "3.8"
2+
3+
services:
4+
2004scape:
5+
build:
6+
context: .
7+
dockerfile: ./Dockerfile
8+
environment:
9+
- PUBLIC_IP
10+
- WEB_PORT
11+
- GAME_PORT
12+
- LOCAL_DEV
13+
- MEMBERS_WORLD
14+
- XP_MULTIPLIER
15+
- PROD_MODE
16+
ports:
17+
- 80:80
18+
- 43594:43594
19+
- 43595:43595

0 commit comments

Comments
 (0)