Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixes missing tsc dependency #586

Merged
merged 6 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions packages/sdk-socket-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,26 @@ ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}

WORKDIR /app

# Install Yarn v3.5.1
RUN corepack enable
# RUN corepack install [email protected]
RUN corepack prepare [email protected] --activate

# Verify yarn version
RUN yarn --version

COPY package.json ./
RUN yarn install
COPY . .
RUN yarn build
COPY yarn.lock ./

# Runtime stage
FROM node:18-alpine
# Install all dependencies including devDependencies
RUN yarn install --frozen-lockfile && npm install typescript -g

WORKDIR /app
COPY --from=builder /app/package.json ./
COPY . .

# If NODE_ENV is development, install all dependencies, else only production dependencies
RUN if [ "$NODE_ENV" = "development" ]; then yarn install; else yarn install --production; fi
RUN yarn build

COPY --from=builder /app/dist ./dist
COPY .env ./

EXPOSE 4000
CMD ["node", "dist/index.js"]
CMD ["node", "dist/index.js"]
10 changes: 4 additions & 6 deletions packages/sdk-socket-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
"lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path ../../.gitignore",
"reset": "yarn clean && rimraf ./node_modules/",
"start": "yarn build && node dist/index.js",
"start:docker": "docker-compose up --build",
"start:docker:dev": "NODE_ENV=development docker-compose up --build",
"start:docker": "yarn build && docker-compose up --build",
"start:docker:dev": "yarn build && NODE_ENV=development docker-compose up --build",
"test": "jest",
"test:ci": "jest --coverage --passWithNoTests"
},
"dependencies": {
"analytics-node": "^6.2.0",
"body-parser": "^1.20.2",
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"helmet": "^5.1.1",
"ioredis": "^5.3.2",
Expand All @@ -51,9 +51,7 @@
"@types/analytics-node": "^3.1.13",
"@types/body-parser": "^1.19.4",
"@types/cors": "^2.8.15",
"@types/dotenv": "^8.2.0",
"@types/express": "^4.17.20",
"@types/helmet": "^4.0.0",
"@types/jest": "^29.5.6",
"@types/node": "^20.4.1",
"@types/socket.io": "^3.0.2",
Expand All @@ -69,7 +67,7 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.0",
"jest": "^29.6.4",
"nodemon": "^2.0.20",
"nodemon": "^3.0.2",
"prettier": "^2.8.8",
"socket.io-client": "^4.7.2",
"supertest": "^6.3.3",
Expand Down
Loading