From 72c476a71fcd353e47502c8389edf001c8fdc0a6 Mon Sep 17 00:00:00 2001 From: Ben Rexin Date: Thu, 29 Jan 2026 02:15:07 +0100 Subject: [PATCH 1/3] feat: mvp docker-compose.yml --- docker-compose.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b7a4d8b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +services: + database: + image: postgres:18 + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: postgres + api: + image: ghcr.io/akra/example-app/api:1.0 + build: + context: ./api + dockerfile: Dockerfile + environment: + DATABASE_URL: postgres://postgres:postgres@database:5432/postgres + frontend: + image: ghcr.io/akra/example-app/frontend:1.0 + build: + context: ./frontend + dockerfile: Dockerfile + ports: + - "4000:4000" + environment: + API_URL: http://api:4000 From 2878b595b2c3c7c3d8add46ae5f1ee9f723e3bff Mon Sep 17 00:00:00 2001 From: Ben Rexin Date: Thu, 29 Jan 2026 02:31:32 +0100 Subject: [PATCH 2/3] feat: mvp Dockerfiles --- api/.dockerignore | 34 ++++++++++++++++++++++++++++++++++ api/.gitignore | 34 ++++++++++++++++++++++++++++++++++ api/Dockerfile | 13 +++++++++++++ frontend/.dockerignore | 34 ++++++++++++++++++++++++++++++++++ frontend/.gitignore | 34 ++++++++++++++++++++++++++++++++++ frontend/Dockerfile | 13 +++++++++++++ 6 files changed, 162 insertions(+) create mode 100644 api/.dockerignore create mode 100644 api/.gitignore create mode 100644 api/Dockerfile create mode 100644 frontend/.dockerignore create mode 100644 frontend/.gitignore create mode 100644 frontend/Dockerfile diff --git a/api/.dockerignore b/api/.dockerignore new file mode 100644 index 0000000..a14702c --- /dev/null +++ b/api/.dockerignore @@ -0,0 +1,34 @@ +# dependencies (bun install) +node_modules + +# output +out +dist +*.tgz + +# code coverage +coverage +*.lcov + +# logs +logs +_.log +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# caches +.eslintcache +.cache +*.tsbuildinfo + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) folder config +.DS_Store diff --git a/api/.gitignore b/api/.gitignore new file mode 100644 index 0000000..a14702c --- /dev/null +++ b/api/.gitignore @@ -0,0 +1,34 @@ +# dependencies (bun install) +node_modules + +# output +out +dist +*.tgz + +# code coverage +coverage +*.lcov + +# logs +logs +_.log +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# caches +.eslintcache +.cache +*.tsbuildinfo + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) folder config +.DS_Store diff --git a/api/Dockerfile b/api/Dockerfile new file mode 100644 index 0000000..fd83d56 --- /dev/null +++ b/api/Dockerfile @@ -0,0 +1,13 @@ +# Build Stage +FROM oven/bun:1 AS build +WORKDIR /app +COPY . . +RUN bun install + +# Runtime Stage (Distroless) +FROM oven/bun:distroless +WORKDIR /app +COPY --from=build /app/node_modules /app/app.ts ./ + +EXPOSE 4000 +ENTRYPOINT ["bun", "run", "app.ts"] diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 0000000..a14702c --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1,34 @@ +# dependencies (bun install) +node_modules + +# output +out +dist +*.tgz + +# code coverage +coverage +*.lcov + +# logs +logs +_.log +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# caches +.eslintcache +.cache +*.tsbuildinfo + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) folder config +.DS_Store diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000..a14702c --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,34 @@ +# dependencies (bun install) +node_modules + +# output +out +dist +*.tgz + +# code coverage +coverage +*.lcov + +# logs +logs +_.log +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# caches +.eslintcache +.cache +*.tsbuildinfo + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) folder config +.DS_Store diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..fd83d56 --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,13 @@ +# Build Stage +FROM oven/bun:1 AS build +WORKDIR /app +COPY . . +RUN bun install + +# Runtime Stage (Distroless) +FROM oven/bun:distroless +WORKDIR /app +COPY --from=build /app/node_modules /app/app.ts ./ + +EXPOSE 4000 +ENTRYPOINT ["bun", "run", "app.ts"] From 72993c1e6c03ee62b9a4ecadbc446ed212154b48 Mon Sep 17 00:00:00 2001 From: Ben Rexin Date: Fri, 30 Jan 2026 11:33:36 +0100 Subject: [PATCH 3/3] fix: add missing postgres --- api/bun.lockb | Bin 0 -> 2506 bytes api/package.json | 3 +++ 2 files changed, 3 insertions(+) create mode 100755 api/bun.lockb diff --git a/api/bun.lockb b/api/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..52cf8f3caaacbe74d6511a9b99c1557ab86c3ab3 GIT binary patch literal 2506 zcmY#Z)GsYA(of3F(@)JSQ%EY!;{sycoc!eMw9K4T-L(9o+{6;yG6OCq1_lO&@Jn`T zlecwN>doHk-dbHUZz^wtV!#z=hYf7kUrD9t8gT*@0RbC?V&H(%>`=M^N_((E84QU9 znP6r?esM{9QED-W!^ObRP!6PlhBfR0(%eA$FOcQ|(hBB1RsOHLt}7XRTz$h)$>$WC z=3Z}u#xK=x($97Xy;hp2AJwb2)z*?T-{#n>z*)N)f%>q44U9Yo&Vjtd7P$F)JdQF43uI4VvrIL0J@360;mio4)YmU5)T2>?*vq13e*oW9%Kfo`Wt|HtSHcb6sRBM zen}vWD@=e=7y#yePM{`7pngzH3Sg+hF90$FW)6skg#m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