twenty/infra/dev/docker-compose.yml
Ruslan 2a9d94c5a2
Improve docker db init / reset (#1981) (#1984)
* renamed volume name db_data to twenty_db_data
* named postgres container_name: twenty_postgres

make provision-postgres does:
* checking if docker is running
* stop the container postgres twenty_postgres
* prune the volume twenty_db_data
* rebuild the image every time, use --build
2023-10-13 15:57:01 +02:00

42 lines
959 B
YAML

version: "3.9"
services:
twenty-dev:
build:
context: ../..
dockerfile: ./infra/dev/twenty-dev/Dockerfile
ports:
- "3000:3000"
- "3001:3001"
- "6006:6006"
volumes:
- ../..:/app
- /app/front/node_modules
- /app/server/node_modules
depends_on:
- postgres
twenty-docs:
build:
context: ../..
dockerfile: ./infra/dev/twenty-docs/Dockerfile
ports:
- "5001:5001"
volumes:
- ../../docs:/app/docs
- twenty_node_modules_docs:/app/docs/node_modules
postgres:
container_name: twenty_postgres
build: ./postgres
volumes:
- twenty_db_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=twenty
- POSTGRES_PASSWORD=twenty
- POSTGRES_DB=default
ports:
- "5432:5432"
volumes:
twenty_db_data:
name: twenty_db_data
twenty_node_modules_front:
twenty_node_modules_server:
twenty_node_modules_docs: