File tree Expand file tree Collapse file tree 4 files changed +43
-1
lines changed Expand file tree Collapse file tree 4 files changed +43
-1
lines changed Original file line number Diff line number Diff line change 1+ .env
2+ .git
3+ .github
4+ node_modules /
5+ dist /
Original file line number Diff line number Diff line change 1+ # Use an official Node.js runtime as a parent image
2+ FROM node:18
3+
4+ # Set the working directory inside the container
5+ WORKDIR /usr/src/app
6+
7+ ENV PATH /usr/src/app/node_modules/.bin:$PATH
8+
9+ # Copy the package.json and package-lock.json files into the container
10+ COPY ./wss/. .
11+
12+ # Install the project dependencies
13+ RUN npm ci
14+
15+ RUN npm run production
16+
17+ # Expose the port that the app runs on (assuming the app runs on port 3000)
18+ EXPOSE 8080
19+
20+ # Start the Node.js application
21+ CMD ["npm", "start"]
22+
Original file line number Diff line number Diff line change @@ -24,6 +24,19 @@ services:
2424 - redis
2525 networks :
2626 - app-network
27+ wss :
28+ build :
29+ context : ./
30+ dockerfile : Dockerfile.wss
31+ labels :
32+ - " traefik.http.routers.wss.rule=Host(`ws.tabletopper.local`)"
33+ env_file : " ./wss/.env"
34+ depends_on :
35+ - mysql
36+ - reverse-proxy
37+ - redis
38+ networks :
39+ - app-network
2740 mysql :
2841 image : mysql:8.0
2942 environment :
Original file line number Diff line number Diff line change 11{
2+ "main" : " dist/src/index.js" ,
23 "devDependencies" : {
34 "@types/node" : " ^17.0.8" ,
45 "npm-watch" : " ^0.11.0" ,
1213 "make" : " tsc" ,
1314 "test" : " rm -rf ./dist && npm run make && node ./build/mover.js && node ./dist/src/index.js" ,
1415 "production" : " npm run make && node ./build/mover.js" ,
15- "watch" : " npm-watch"
16+ "watch" : " npm-watch" ,
17+ "start" : " node ./dist/src/index.js"
1618 },
1719 "watch" : {
1820 "test" : {
You can’t perform that action at this time.
0 commit comments