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"
|
||||
|
||||
fe-middleware:
|
||||
image: oven/bun:1
|
||||
build:
|
||||
dockerfile: Dockerfile.dev
|
||||
container_name: fe-middleware
|
||||
entrypoint: /bin/bash -c
|
||||
command: ["bun --hot run src/index.ts"]
|
||||
working_dir: /usr/src/app
|
||||
ports:
|
||||
- "8081:8081"
|
||||
depends_on:
|
||||
|
@ -40,8 +38,6 @@ services:
|
|||
BOT_API_URI: "http://bot-api:8080"
|
||||
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
|
||||
volumes:
|
||||
- ./:/usr/src/app:ro
|
||||
|
||||
volumes:
|
||||
mongodb_data:
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"start": "bun run src/index.ts",
|
||||
"dev": "docker compose down -v && docker compose up",
|
||||
"test": "docker compose down -v && docker compose run fe-middleware 'sleep 5 && bun test'"
|
||||
"dev": "docker compose down -v && docker compose up --build",
|
||||
"test": "docker compose down -v && docker compose run --build fe-middleware 'pwd && ls && sleep 5 && bun test'"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue