59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:17
|
|
environment:
|
|
POSTGRES_DB: ulhub
|
|
POSTGRES_USER: ulhub
|
|
POSTGRES_PASSWORD: development
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
|
|
mosquitto:
|
|
image: eclipse-mosquitto:2
|
|
ports:
|
|
- "1883:1883"
|
|
- "8883:8883"
|
|
- "9001:9001"
|
|
volumes:
|
|
- ./mosquitto:/mosquitto
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "3001:3001"
|
|
depends_on:
|
|
- postgres
|
|
# Development mounts: mount source for hot-reload and keep container node_modules
|
|
volumes:
|
|
- ./backend:/usr/src/app:delegated
|
|
- /usr/src/app/node_modules
|
|
environment:
|
|
DATABASE_HOST: postgres
|
|
DATABASE_PORT: 5432
|
|
DATABASE_USER: ulhub
|
|
DATABASE_PASSWORD: development
|
|
DATABASE_NAME: ulhub
|
|
NODE_ENV: development
|
|
command: npm run start:dev
|
|
|
|
web:
|
|
build:
|
|
context: ./web
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- backend
|
|
# Development mount: mount web code into container for Next.js dev server
|
|
volumes:
|
|
- ./web:/usr/src/app:delegated
|
|
- /usr/src/app/node_modules
|
|
environment:
|
|
BACKEND_HOST: http://backend:3001
|
|
NODE_ENV: development
|
|
command: npm run dev
|
|
|
|
volumes:
|
|
postgres-data: |