Dockerized application
This commit is contained in:
parent
642e075721
commit
9ffbe715b6
|
@ -0,0 +1,10 @@
|
||||||
|
FROM oven/bun:1
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
COPY src/ src/
|
||||||
|
COPY bun.lockb .
|
||||||
|
COPY package.json .
|
||||||
|
COPY tsconfig.json .
|
||||||
|
RUN bun install --production --frozen-lockfile
|
||||||
|
EXPOSE 8081/tcp
|
||||||
|
ENTRYPOINT [ "/bin/bash", "-c" ]
|
||||||
|
CMD ["bun run src/index.ts"]
|
|
@ -0,0 +1,7 @@
|
||||||
|
FROM oven/bun:1
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
COPY . .
|
||||||
|
RUN bun install
|
||||||
|
EXPOSE 8081/tcp
|
||||||
|
ENTRYPOINT [ "/bin/bash", "-c" ]
|
||||||
|
CMD ["bun --hot run src/index.ts"]
|
|
@ -26,11 +26,9 @@ services:
|
||||||
JWTSECRET: "cooljwtsecret"
|
JWTSECRET: "cooljwtsecret"
|
||||||
|
|
||||||
fe-middleware:
|
fe-middleware:
|
||||||
image: oven/bun:1
|
build:
|
||||||
|
dockerfile: Dockerfile.dev
|
||||||
container_name: fe-middleware
|
container_name: fe-middleware
|
||||||
entrypoint: /bin/bash -c
|
|
||||||
command: ["bun --hot run src/index.ts"]
|
|
||||||
working_dir: /usr/src/app
|
|
||||||
ports:
|
ports:
|
||||||
- "8081:8081"
|
- "8081:8081"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -40,8 +38,6 @@ services:
|
||||||
BOT_API_URI: "http://bot-api:8080"
|
BOT_API_URI: "http://bot-api:8080"
|
||||||
GELBOORU_IMAGES_PER_REQUEST: 100 # Number of images per request, maximum 100
|
GELBOORU_IMAGES_PER_REQUEST: 100 # Number of images per request, maximum 100
|
||||||
GELBOORU_TAGS: "2girls sleeping" # Tags of the images. The images will have all of these tags
|
GELBOORU_TAGS: "2girls sleeping" # Tags of the images. The images will have all of these tags
|
||||||
volumes:
|
|
||||||
- ./:/usr/src/app:ro
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mongodb_data:
|
mongodb_data:
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "bun run src/index.ts",
|
"start": "bun run src/index.ts",
|
||||||
"dev": "docker compose down -v && docker compose up",
|
"dev": "docker compose down -v && docker compose up --build",
|
||||||
"test": "docker compose down -v && docker compose run fe-middleware 'sleep 5 && bun test'"
|
"test": "docker compose down -v && docker compose run --build fe-middleware 'pwd && ls && sleep 5 && bun test'"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue