Skip to content

Commit 493098f

Browse files
authored
Merge pull request #388 from Jameskmonger/fix-docker
fix: make Dockerfile work, and make Docker Compose use it
2 parents 6622b47 + a874299 commit 493098f

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ WORKDIR /usr/src/app
33
COPY package.json ./
44
COPY package-lock.json ./
55

6-
RUN npm install
6+
RUN npm ci
77

88
COPY src ./src
99
COPY tsconfig.json ./
10+
COPY .babelrc ./
1011

11-
RUN npm build
12+
RUN npm run build
1213

1314
EXPOSE 43594
14-
CMD [ "npm", "start" ]
15+
CMD [ "npm", "run", "start:standalone" ]

docker-compose.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ version: "3.8"
22

33
services:
44
runejs_game_server:
5-
image: node:16
6-
container_name: runejs_game_server
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
volumes:
9+
- ./data:/usr/src/app/data
10+
- ./cache:/usr/src/app/cache
11+
- ./config:/usr/src/app/config
712
ports:
813
- "43594:43594"
9-
volumes:
10-
- .:/usr/src/service
11-
working_dir: /usr/src/service
12-
command: npm run start
1314

1415
networks:
1516
default:

0 commit comments

Comments
 (0)