shelve icon indicating copy to clipboard operation
shelve copied to clipboard

What happened to docker-compose.yml?

Open bilogic opened this issue 2 months ago • 10 comments

Description

Seems like it isn't in the main branch, any reason why?

bilogic avatar Oct 30 '25 10:10 bilogic

@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!

HugoRCD avatar Oct 30 '25 10:10 HugoRCD

Right, will this file still work? https://github.com/HugoRCD/shelve/blob/e7c747bb21a7578abd3fc3d3fee1b88237989c82/apps/shelve/Dockerfile

bilogic avatar Oct 30 '25 10:10 bilogic

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

HugoRCD avatar Oct 30 '25 11:10 HugoRCD

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

bilogic avatar Oct 30 '25 11:10 bilogic

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 avatar Oct 30 '25 11:10 bilogic

@bilogic Building the app and launching it should be pretty straightforward. The only problem is having migrations applied automatically when you launch the app

HugoRCD avatar Oct 30 '25 13:10 HugoRCD

what is the command to perform migrations?

bilogic avatar Oct 31 '25 03:10 bilogic

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

Image

HugoRCD avatar Oct 31 '25 22:10 HugoRCD

  1. I see 3 db commands, where I come from, I only need to migrate
  2. Why is having migrations applied a problem?
  3. Is generate and push required?

bilogic avatar Nov 02 '25 02:11 bilogic

Normally, yes, you should only have to use the migrate command

HugoRCD avatar Nov 02 '25 12:11 HugoRCD