What happened to docker-compose.yml?
Description
Seems like it isn't in the main branch, any reason why?
@bilogic I removed it because I wanted to have the simplest deployment possible (that's why the project is on Vercel now) and I didn't really have an environment to test deployment via Docker but with the arrival of the next version of NuxtHub I'll probably do it again since deployment will be much easier!
Right, will this file still work? https://github.com/HugoRCD/shelve/blob/e7c747bb21a7578abd3fc3d3fee1b88237989c82/apps/shelve/Dockerfile
Right, will this file still work?
e7c747b/apps/shelve/Dockerfile
I don't know, as the project has been running for a while on pnpm and not Bun anymore, but it worked back then, so it should still work
I tested, bun no longer works, throwing a bunch of errors, pnpm works, but I realized it requires postgres
I think DATABASE_URL should be specified from .env on the host and use docker-compose.yml to create a postgres service
This built successfully with docker build -t shelve:bilogic, but I'm not sure if I missed any steps, can help check?
# /Dockerfile
# Stage 1: Build Stage
FROM octoblu/pnpm:latest AS build
ARG DATABASE_URL
ARG TURBO_TEAM
ARG TURBO_TOKEN
ENV DATABASE_URL=$DATABASE_URL
ENV TURBO_TEAM=$TURBO_TEAM
ENV TURBO_TOKEN=$TURBO_TOKEN
ENV NODE_ENV=production
WORKDIR /app
COPY package.json ./
COPY apps/shelve/package.json ./apps/shelve/package.json
COPY . .
COPY apps/shelve/.env.example ./apps/shelve/.env
RUN pnpm install
# Stage 2: Final Stage
FROM octoblu/pnpm:latest
WORKDIR /app
# COPY --from=build /app/apps/shelve/.output .output
# RUN apt-get update && apt-get install -y curl
EXPOSE 3000
CMD ["pnpm", "run", "dev:app"]
@bilogic Building the app and launching it should be pretty straightforward. The only problem is having migrations applied automatically when you launch the app
what is the command to perform migrations?
what is the command to perform migrations?
Sorry for the late reply, you can find everything related to the database / migration here in the project package.json
- I see 3 db commands, where I come from, I only need to
migrate - Why is having migrations applied a problem?
- Is
generateandpushrequired?
Normally, yes, you should only have to use the migrate command