diff --git a/services/our/Dockerfile b/services/our/Dockerfile index e69de29..fc9b22a 100644 --- a/services/our/Dockerfile +++ b/services/our/Dockerfile @@ -0,0 +1,37 @@ +# Use Node 22 base image +FROM node:22-slim + +# Set working directory +WORKDIR /app + +# Install system-level dependencies +RUN apt-get update -y && \ + apt-get install -y --no-install-recommends \ + build-essential \ + git \ + inotify-tools \ + ffmpeg \ + mktorrent \ + python3 \ + python3-pip \ + && pip install --no-cache-dir torrentfile ultralytics \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Enable corepack +RUN corepack enable && corepack prepare pnpm@latest --activate + +# Copy and install dependencies +COPY package.json pnpm-lock.yaml ./ +RUN pnpm install --frozen-lockfile --prod + +# Copy the rest of the code +COPY . . + +# Build the app +RUN pnpm run build + +# Expose the port +EXPOSE 5000 + +# Start the app +CMD ["pnpm", "start"] diff --git a/services/our/docker-compose.production.yml b/services/our/compose.production.yml similarity index 79% rename from services/our/docker-compose.production.yml rename to services/our/compose.production.yml index d283162..4420b0b 100644 --- a/services/our/docker-compose.production.yml +++ b/services/our/compose.production.yml @@ -42,7 +42,15 @@ services: our: - image: + build: + context: . + dockerfile: Dockerfile + container_name: our-app + ports: + - "5000:5000" + env_file: .env.production ## @see ./src/config/env.ts for all env var names. + depends_on: + - postgres volumes: pgdata: \ No newline at end of file