R
Railway10mo ago
Zazh

Private network DB not found

Hi! It's saying that the private network can't be found.
25 Replies
Percy
Percy10mo ago
Project ID: N/A
Zazh
ZazhOP10mo ago
No description
Brody
Brody10mo ago
are you building with an alpine image?
Zazh
ZazhOP10mo ago
yeah
Zazh
ZazhOP10mo ago
ok i'll check it out
Zazh
ZazhOP10mo ago
No description
Zazh
ZazhOP10mo ago
this is my env DB_CONNECTION_URL=${{DB-SQL.MYSQL_PRIVATE_URL}}/support
Brody
Brody10mo ago
screenshot of your project please
Zazh
ZazhOP10mo ago
No description
Brody
Brody10mo ago
have you modified any variables on the DB-SQL service
Zazh
ZazhOP10mo ago
yeah, i removed the last section on the private db url part since i have multiple databases on that service
Brody
Brody10mo ago
yeah I figured, just needed to make sure
Zazh
ZazhOP10mo ago
ok i think i fixed it i had a trailing slash in the DB's env
Brody
Brody10mo ago
ha that was going to be my next question
Zazh
ZazhOP10mo ago
is there a way to have a build path different then the running path
Brody
Brody10mo ago
you're building with a dockerfile that's entirely up to you
Zazh
ZazhOP10mo ago
can i show you my dockerfile because i'm a bit confused on that
Brody
Brody10mo ago
of course, though I'd likely still need more context than that
Zazh
ZazhOP10mo ago
# syntax=docker/dockerfile:1

FROM node:18-alpine AS builder
WORKDIR /build

RUN apk add --no-cache make gcc g++ python3

RUN npm install -g pnpm
COPY package.json pnpm-lock.yaml ./
COPY --link scripts scripts
RUN chmod +x ./scripts/start.sh
# install dependencies, CI=true to skip pre/postinstall scripts
RUN CI=true pnpm install --prod --frozen-lockfile
COPY --link . .

FROM node:18-alpine AS runner
RUN apk --no-cache add curl \
&& adduser --disabled-password --home /home/container container \
&& mkdir /app \
&& chown container:container /app \
&& chmod -R 777 /app
USER container
ENV USER=container \
HOME=/home/container \
NODE_ENV=production \
HTTP_HOST=0.0.0.0 \
DOCKER=true
WORKDIR /home/container
COPY --from=builder --chown=container:container --chmod=777 /build /app
ENTRYPOINT [ "/app/scripts/start.sh" ]
# syntax=docker/dockerfile:1

FROM node:18-alpine AS builder
WORKDIR /build

RUN apk add --no-cache make gcc g++ python3

RUN npm install -g pnpm
COPY package.json pnpm-lock.yaml ./
COPY --link scripts scripts
RUN chmod +x ./scripts/start.sh
# install dependencies, CI=true to skip pre/postinstall scripts
RUN CI=true pnpm install --prod --frozen-lockfile
COPY --link . .

FROM node:18-alpine AS runner
RUN apk --no-cache add curl \
&& adduser --disabled-password --home /home/container container \
&& mkdir /app \
&& chown container:container /app \
&& chmod -R 777 /app
USER container
ENV USER=container \
HOME=/home/container \
NODE_ENV=production \
HTTP_HOST=0.0.0.0 \
DOCKER=true
WORKDIR /home/container
COPY --from=builder --chown=container:container --chmod=777 /build /app
ENTRYPOINT [ "/app/scripts/start.sh" ]
Brody
Brody10mo ago
alright, nothing too crazy going on, what's not working?
Zazh
ZazhOP10mo ago
alright so it builds and then tries to access /app when it's deployed but then says /app doesn't exist
Brody
Brody10mo ago
try setting the workdir to app, you have it set to /home/container but also show me the exact error message please
Zazh
ZazhOP10mo ago
No description
Zazh
ZazhOP10mo ago
trying your thing ok gotta go for abt 30 mins i'll be back
Want results from more Discord servers?
Add your server