Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhorner committed Dec 2, 2024
0 parents commit ebbe7ab
Show file tree
Hide file tree
Showing 11 changed files with 798 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
fixtures
dist
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:20-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY . /app
WORKDIR /app

FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build

FROM base
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
CMD [ "pnpm", "start" ]
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
dragonify:
build: .
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
3 changes: 3 additions & 0 deletions fixtures/ix-test-two/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
services:
redis:
image: redis:alpine
5 changes: 5 additions & 0 deletions fixtures/ix-test/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
services:
redis:
image: redis:alpine
ports:
- "6379:6379"
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "dragonify",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "ts-node src/index.ts",
"start": "node dist/index.js",
"build": "tsc"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/dockerode": "^3.3.32",
"@types/stream-json": "^1.7.8",
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
},
"dependencies": {
"dockerode": "^4.0.2",
"stream-chain": "^3.3.2",
"stream-json": "^1.9.1"
}
}
Loading

0 comments on commit ebbe7ab

Please sign in to comment.