Skip to content

Commit

Permalink
Merge pull request #5 from jmgoncalves97/build/update-docker-for-deve…
Browse files Browse the repository at this point in the history
…lopment

build: update docker for development
  • Loading branch information
jmgoncalves97 authored Jan 17, 2025
2 parents b222e4d + a00e821 commit 1b979fa
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 70 deletions.
34 changes: 7 additions & 27 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,33 +1,13 @@
FROM node:18-slim

RUN apt-get update && \
apt-get install -y \
curl \
python3 \
python3-pip \
unzip \
RUN apt-get -qy update \
&& apt-get -qy --no-install-recommends install \
openssl \
&& apt-get autoremove -yq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN curl -fsSL https://bun.sh/install | bash

ENV PATH="/root/.bun/bin:$PATH"

RUN npm install -g pnpm

RUN bun --version && python3 --version && pnpm -v

WORKDIR /app

COPY ./package.json ./

COPY ./turbo.json ./

COPY ./pnpm-workspace.yaml ./

RUN pnpm install

RUN pnpm turbo run build --filter=viewer --filter=builder

RUN npm install -g pm2

EXPOSE 3000
EXPOSE 3000
EXPOSE 3001
4 changes: 2 additions & 2 deletions apps/builder/.env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ ENCRYPTION_SECRET=SgVkYp2s5v8y/B?E(H+MbQeThWmZq4t6 #256-bits secret (can be gene
NEXTAUTH_URL=http://localhost:3000
NEXT_PUBLIC_VIEWER_URL=http://localhost:3001

GITHUB_CLIENT_ID=534b549dd17709a743a2
GITHUB_CLIENT_SECRET=7adb03507504fb1a54422f6c3c697277cfd000a9
GITHUB_CLIENT_ID=Ov23liv5olc27SY9YdUV
GITHUB_CLIENT_SECRET=7249890167c442df8e542871052a7eb63d811d63

S3_ACCESS_KEY=minio
S3_SECRET_KEY=minio123
Expand Down
9 changes: 6 additions & 3 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ services:
build:
context: .
dockerfile: Dockerfile.dev
mem_limit: 1.5g
cpus: 0.5
mem_limit: 6g
cpus: 1.5
env_file:
.env
volumes:
- ./:/app
working_dir: /app
command: sh -c "pnpm dev"
entrypoint: ./entrypoint.dev.sh

ports:
- '3001:3000'
- '3002:3001'
Expand Down
38 changes: 0 additions & 38 deletions docker-compose.yml

This file was deleted.

5 changes: 5 additions & 0 deletions entrypoint.dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

pnpm install

pnpm dev

0 comments on commit 1b979fa

Please sign in to comment.