Abner
Abner
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
oww ok, i don't have no idea about that, i will change that
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
Even if it is a development environment ?
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
you say about
npm run start:dev
npm run start:dev
?
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
you say that rigth ENABLE_ALPINE_PRIVATE_NETWORKING=true ?
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
Thanks so much @Adam and @Brody, you guys are awesome
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
ho it's work !!!!!
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
No description
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
No description
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
i try use a config as code, but i don't know i do this corret skskksks
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
hummm that makes sense , but when i change the image ( FROM) for a version normal node like node:21 it's work and i don't recive this erros ( i don't know why )
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
migrate-and-start.sh:
#!/bin/sh
npm run build
npx prisma generate
npx prisma migrate deploy
npm run start:dev
#!/bin/sh
npm run build
npx prisma generate
npx prisma migrate deploy
npm run start:dev
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
# Use the official Node.js image as the base image
FROM node:20-alpine

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy package.json and package-lock.json to the working directory
COPY package.json package-lock.json ./

# Install dependencies
RUN apk update && apk add bash
RUN npm install

# Copy the rest of the application code
COPY . .

# Expose the port the application will run on
EXPOSE 3000

# Command to start the application
CMD ["bash","migrate-and-start.sh"]
# Use the official Node.js image as the base image
FROM node:20-alpine

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy package.json and package-lock.json to the working directory
COPY package.json package-lock.json ./

# Install dependencies
RUN apk update && apk add bash
RUN npm install

# Copy the rest of the application code
COPY . .

# Expose the port the application will run on
EXPOSE 3000

# Command to start the application
CMD ["bash","migrate-and-start.sh"]
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
I can put here Dockerfile for you see ?
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
In my case I'm just using the dockerfile to configure the node version and then execute commands in the terminal through a .sh file, as I'm using Prisma I need to perform the generate and deploy commands, sorry for not explaining it before.
35 replies
RRailway
Created by Abner on 1/3/2024 in #✋|help
Dockerfile with node alpine can't access database internal network
8e7a534e-bfc1-40ca-a40a-9695fda79d5a
35 replies