From 6523bf62864ac9906c6ea71cdf6b0f262c81876c Mon Sep 17 00:00:00 2001 From: Juan Rodriguez Date: Wed, 18 Oct 2023 16:23:16 -0500 Subject: [PATCH] chore: bun ci setup --- .github/workflows/deploy.yaml | 4 ++-- Dockerfile | 26 ++++++++++++++++++-------- docker-compose.yml | 5 +++++ 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a5f0f13..3a2a9d5 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,5 +1,5 @@ --- -name: "deploy to sjdonado.de" +name: 'deploy to sjdonado.de' on: push: @@ -16,5 +16,5 @@ jobs: - name: Push to dokku uses: dokku/github-action@master with: - git_remote_url: "ssh://dokku@ssh.sjdonado.de:22/idonthavespotify" + git_remote_url: 'ssh://dokku@ssh.sjdonado.de:22/idonthavespotify' ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/Dockerfile b/Dockerfile index 3a4ceaa..36f5d36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,26 @@ -FROM node:19-alpine +FROM oven/bun -EXPOSE 5000 +EXPOSE 3000 WORKDIR /usr/src/app -COPY package.json ./ -COPY yarn.lock ./ +ENV NODE_ENV production -RUN yarn install +COPY package.json . +COPY bun.lockb . -COPY . . +RUN bun install -RUN yarn build +COPY src src +COPY www www -CMD ["node", "./dist/server.js"] +COPY tsconfig.json . +COPY build.ts . +COPY tailwind.config.js . + +RUN bun run build:js +RUN bun run build:css + +COPY public public + +CMD ["bun", "www/bin.ts"] diff --git a/docker-compose.yml b/docker-compose.yml index 7fd4241..664ebe9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,10 @@ version: '3' services: + app: + image: idonthavespotify + env_file: .env + ports: + - 3000:3000 redis: image: redis:7.0-alpine ports: