From d64855c9509746b598028d6ae6131340f2a0850e Mon Sep 17 00:00:00 2001 From: Sugui Date: Fri, 26 Jan 2024 19:12:47 +0100 Subject: [PATCH] Make the current app run in its own docker compose environment --- compose.yaml | 44 ++++++++++++++++++++++++++++++++++++++++++++ vite.config.ts | 5 ++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 compose.yaml diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..bcec386 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,44 @@ +version: "3" + +services: + # mongodb: + # image: mongo:bionic + # container_name: mongodb + # ports: + # - "27017:27017" + # environment: + # MONGO_INITDB_ROOT_USERNAME: root + # MONGO_INITDB_ROOT_PASSWORD: password + # MONGO_INITDB_DATABASE: bot + # volumes: + # - mongodb_data:/data/db + + # bot-api: + # image: oven/bun:1 + # container_name: bot-api + # command: bun run docker-dev + # working_dir: /usr/src/app + # ports: + # - "8080:8080" + # depends_on: + # - mongodb + # environment: + # MONGODB_URI: "mongodb://mongodb:27017/bot" + # MONGODB_USER: "root" + # MONGODB_PASS: "password" + # JWTSECRET: "cooljwtsecret" + # volumes: + # - ./:/usr/src/app:ro + + bot-image-moderation-fe: + image: oven/bun:1 + container_name: bot-image-moderation-fe + command: bun run dev --host + working_dir: /usr/src/app + ports: + - "8081:8081" + volumes: + - ./:/usr/src/app + +volumes: + mongodb_data: diff --git a/vite.config.ts b/vite.config.ts index 861b04b..146d35f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,4 +4,7 @@ import react from '@vitejs/plugin-react-swc' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], -}) + server: { + port: 8081, + }, +}) \ No newline at end of file