Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
backend:
build: ./backend
container_name: gcc-backend
command: sh -c "bunx prisma migrate deploy && bun --hot src/index.ts"
command: sh -c "bunx prisma generate && bunx prisma migrate deploy && bun --hot src/index.ts"
ports:
- "8080:8080"
environment:
Expand Down Expand Up @@ -69,6 +69,7 @@ services:
- "3000:6767"
environment:
API_URL: http://localhost:8080
PUBLIC_URL: http://localhost:3000
volumes:
- ./frontend/src:/app/src
depends_on:
Expand Down
6 changes: 3 additions & 3 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ RUN bun install
COPY . .

# Expose le port du frontend
EXPOSE 3000
EXPOSE 6767

# Lance le serveur de dev
CMD ["bun", "run", "dev", "--host", "0.0.0.0"]
# Lance le serveur de dev avec hot reload (src/index.ts écoute sur PORT ?? 6767)
CMD ["bun", "--hot", "src/index.ts"]



Expand Down
10 changes: 9 additions & 1 deletion frontend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@ const server = serve({
},
});

console.log(`Server running at ${server.url}`);
const publicUrl = process.env.PUBLIC_URL ?? server.url.toString();
console.log(`
┌─────────────────────────────────────────┐
│ GCC — Dev Environment │
├─────────────────────────────────────────┤
│ Frontend → ${publicUrl.padEnd(25)}│
│ Backend → http://localhost:8080 │
└─────────────────────────────────────────┘
`);
Loading