R
Railway9mo ago
Zazh

Private network DB not found

Hi! It's saying that the private network can't be found.
25 Replies
Percy
Percy9mo ago
Project ID: N/A
Zazh
Zazh9mo ago
No description
Brody
Brody9mo ago
are you building with an alpine image?
Zazh
Zazh9mo ago
yeah
Zazh
Zazh9mo ago
ok i'll check it out
Zazh
Zazh9mo ago
No description
Zazh
Zazh9mo ago
this is my env DB_CONNECTION_URL=${{DB-SQL.MYSQL_PRIVATE_URL}}/support
Brody
Brody9mo ago
screenshot of your project please
Zazh
Zazh9mo ago
No description
Brody
Brody9mo ago
have you modified any variables on the DB-SQL service
Zazh
Zazh9mo ago
yeah, i removed the last section on the private db url part since i have multiple databases on that service
Brody
Brody9mo ago
yeah I figured, just needed to make sure
Zazh
Zazh9mo ago
ok i think i fixed it i had a trailing slash in the DB's env
Brody
Brody9mo ago
ha that was going to be my next question
Zazh
Zazh9mo ago
is there a way to have a build path different then the running path
Brody
Brody9mo ago
you're building with a dockerfile that's entirely up to you
Zazh
Zazh9mo ago
can i show you my dockerfile because i'm a bit confused on that
Brody
Brody9mo ago
of course, though I'd likely still need more context than that
Zazh
Zazh9mo 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
Brody9mo ago
alright, nothing too crazy going on, what's not working?
Zazh
Zazh9mo ago
alright so it builds and then tries to access /app when it's deployed but then says /app doesn't exist
Brody
Brody9mo ago
try setting the workdir to app, you have it set to /home/container but also show me the exact error message please
Zazh
Zazh9mo ago
No description
Zazh
Zazh9mo ago
trying your thing ok gotta go for abt 30 mins i'll be back
Want results from more Discord servers?
Add your server