Skip to content

Commit 44c3d31

Browse files
committed
add workflows and Dockerfile
1 parent c91b7ac commit 44c3d31

File tree

3 files changed

+49
-8
lines changed

3 files changed

+49
-8
lines changed

.github/workflows/build.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Set up QEMU
15+
uses: docker/setup-qemu-action@v3
16+
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v3
19+
20+
- name: Login to Docker Hub
21+
uses: docker/login-action@v3
22+
with:
23+
username: ${{ secrets.DOCKERHUB_USERNAME }}
24+
password: ${{ secrets.DOCKERHUB_TOKEN }}
25+
26+
- name: Build and push
27+
uses: docker/build-push-action@v5
28+
with:
29+
context: .
30+
platforms: linux/amd64,linux/arm64
31+
push: true
32+
tags: |
33+
lassejlv/postgres_http:latest
34+
lassejlv/postgres_http:${{ github.sha }}

Dockerfile

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM oven/bun:latest
2+
3+
ARG PORT
4+
ARG DATABASE_URL
5+
ARG API_KEY
6+
ARG ALLOW_DANGEROUS_SQL_COMMANDS
7+
8+
WORKDIR /app
9+
COPY . .
10+
RUN bun install --no-save
11+
RUN bun run build
12+
13+
EXPOSE $PORT
14+
15+
CMD ["./dist/server"]

nixpacks.toml

-8
This file was deleted.

0 commit comments

Comments
 (0)