diff --git a/backend/Dockerfile b/backend/Dockerfile index b283c95..6eada02 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -7,6 +7,6 @@ RUN npm install COPY . . -EXPOSE 3001 +EXPOSE 7001 CMD ["npm", "start"] \ No newline at end of file diff --git a/backend/server.js b/backend/server.js index e3f91fc..1484b05 100644 --- a/backend/server.js +++ b/backend/server.js @@ -3,7 +3,7 @@ import cors from "cors"; import env from "dotenv"; env.config(); const app = express(); -const port = 3001; +const port = 7001; app.use(cors()); app.use(express.urlencoded({ extended: true })); diff --git a/docker-compose.yml b/docker-compose.yml index c9db63b..1b83b0d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,21 +1,29 @@ services: - # frontend: - # container_name: frontend - # build: ./frontend - # ports: - # - "3003:3003" - # environment: - # - CHOKIDAR_USEPOLLING=true - # volumes: - # - ./frontend:/app - # - /app/node_modules - # restart: unless-stopped + frontend: + container_name: frontend + build: ./frontend + ports: + - "7002:7002" + networks: + - proxynet + environment: + - CHOKIDAR_USEPOLLING=true + volumes: + - ./frontend:/app + - /app/node_modules + restart: unless-stopped backend: container_name: backend build: ./backend ports: - - "3001:3001" + - "7001:7001" + networks: + - proxynet volumes: - ./backend:/bikelane-backend - restart: unless-stopped \ No newline at end of file + restart: unless-stopped + +networks: + proxynet: + external: true diff --git a/frontend/Dockerfile b/frontend/Dockerfile index aaffe27..5f3667f 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -7,6 +7,6 @@ RUN npm install COPY . . -EXPOSE 3003 +EXPOSE 7002 CMD ["npm", "start"] \ No newline at end of file diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 3e8f4fb..15d1c80 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -2,4 +2,11 @@ import { defineConfig } from "vite"; import tailwindcss from "@tailwindcss/vite"; export default defineConfig({ plugins: [tailwindcss()], + server: { + host: "0.0.0.0", + port: 7002, + watch: { + usePolling: true, + }, + }, });