Fix missing base url during docker build (#180)

This commit is contained in:
Luke Vella 2022-05-19 16:48:48 +01:00 committed by GitHub
parent 35159bf3a1
commit c07885beee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -11,10 +11,13 @@ COPY package.json /usr/src/app
COPY yarn.lock /usr/src/app
COPY prisma/schema.prisma /usr/src/app
RUN yarn --production
RUN yarn --frozen-lockfile
COPY . /usr/src/app
ARG NEXT_PUBLIC_BASE_URL
ENV NEXT_PUBLIC_BASE_URL $NEXT_PUBLIC_BASE_URL
RUN yarn build
EXPOSE 3000

View file

@ -13,6 +13,7 @@ services:
context: .
args:
- DATABASE_URL=postgres://postgres:postgres@rallly_db:5432/db?pgbouncer=true
- NEXT_PUBLIC_BASE_URL=${NEXT_PUBLIC_BASE_URL}
restart: always
command: sh -c "yarn prisma migrate deploy && yarn start"
depends_on: