Dockerfile
My dockerfile:
FROM node:20-alpine
WORKDIR /app
COPY . .
RUN npm install
CMD ["node", "src/index.js"]
this is my first try using railway
8 Replies
Project ID:
N/A
N/A
share your package.json please
{
"name": "api",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "kill-port 3000 && npm run services:up && nodemon ./src/index.js",
"services:up": "docker-compose -f ./docker-compose.yml up -d",
"test": "jest --no-cache --detectOpenHandles --runInBand --forceExit",
"migrate": "node-pg-migrate -m './src/database/migrations'"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@faker-js/faker": "github:faker-js/faker",
"axios": "^1.6.5",
"bcrypt": "^5.1.1",
"cheerio": "1.0.0-rc.12",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"dotenv-expand": "^10.0.0",
"express": "^4.18.2",
"express-async-errors": "^3.1.1",
"iso-639-1": "^3.1.0",
"jsonwebtoken": "^9.0.2",
"knex": "^3.1.0",
"node-pg-migrate": "^6.2.2",
"nodemailer": "^6.9.8",
"pg": "^8.11.3",
"uuid": "^9.0.1",
"youtube-info": "^1.3.2",
"youtube-transcript": "^1.0.6"
},
"devDependencies": {
"kill-port": "^2.0.1",
"newrelic": "^11.9.0",
"nodemon": "^3.0.2",
"prettier": "^3.1.1",
"sqlite3": "^5.1.7"
}
}
I've found out the bug
do tell
it's the version of node alpine
I changed to FROM node:19.5.0-alpine
and works
odd, but alrightly
🙏