celestial
celestial
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
that makes more sense
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
Ahh
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
Will do my friend
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
I would not have thought that the ARG would be what I needed
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
Thank you Brody 🤝
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
😮 OH WAIT ITS WORKING
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
do .env files override serivce variables? can that might be the issue
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
Oh
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
is that a bad practice
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
But yeah im using .env files
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
ope that was the wrong dockerfile i copy/pasted. that was my backend 😅 sorry bout that. the correct dockerfile is updated tho 👍
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
👀 currently deploying. I noticed there was no cache message though
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
FROM node:18-alpine as base

WORKDIR /server

FROM base as build
ARG NEXT_PUBLIC_API_URL
COPY package*.json ./
RUN npm ci

COPY . ./
RUN npx prisma generate
RUN npm run build

FROM base as production

COPY --from=build /server/build /server/build
COPY --from=build /server/node_modules /server/node_modules
COPY --from=build /server/prisma /server/prisma
COPY --from=build /server/.env* /server/
COPY --from=build /server/startup.sh /server/

EXPOSE 8080
ENV PORT 8080
CMD ["node", "/server/build/index.js"]
FROM node:18-alpine as base

WORKDIR /server

FROM base as build
ARG NEXT_PUBLIC_API_URL
COPY package*.json ./
RUN npm ci

COPY . ./
RUN npx prisma generate
RUN npm run build

FROM base as production

COPY --from=build /server/build /server/build
COPY --from=build /server/node_modules /server/node_modules
COPY --from=build /server/prisma /server/prisma
COPY --from=build /server/.env* /server/
COPY --from=build /server/startup.sh /server/

EXPOSE 8080
ENV PORT 8080
CMD ["node", "/server/build/index.js"]
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
deployment logs
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
No description
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
FROM node:18-alpine AS base

RUN apk add --no-cache libc6-compat

# Build
FROM base AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

# Production
FROM base AS production
WORKDIR /app

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

# Set the correct permission for prerender cache
RUN mkdir .next
RUN chown nextjs:nodejs .next


COPY --from=builder /app/package*.json ./
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/node_modules ./node_modules

USER nextjs
EXPOSE 3000

ENV PORT 3000
ENV HOSTNAME "0.0.0.0"

CMD ["npm", "start"]
FROM node:18-alpine AS base

RUN apk add --no-cache libc6-compat

# Build
FROM base AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

# Production
FROM base AS production
WORKDIR /app

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

# Set the correct permission for prerender cache
RUN mkdir .next
RUN chown nextjs:nodejs .next


COPY --from=builder /app/package*.json ./
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/node_modules ./node_modules

USER nextjs
EXPOSE 3000

ENV PORT 3000
ENV HOSTNAME "0.0.0.0"

CMD ["npm", "start"]
This is essentially the same Dockerfile provided by next.js's examples
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
sure
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
but
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
i guess i could also try the internal railway URL
62 replies
RRailway
Created by celestial on 9/24/2023 in #✋|help
Build keeps hitting cache -> ENV variable is not changing
yes
62 replies