ToolJet/docker-compose.yaml
Sherfin Shamsudeen 1f0ff9ecf8
Add functionality to decide whether front-end should be served from server (#547)
* Add functionality to decide whether front-end should be served from server

This commit makes the server allow flag `--serve-frontend`, providing
which, will make the server serve the front-end at route '/'. Otherwise
it won't serve the front-end.

* Use env variable to enable serving client from a server end-point

* Add documentation for SERVE_CLIENT env var
2021-08-20 09:25:34 +05:30

48 lines
944 B
YAML

version: '3'
services:
client:
build:
context: ./frontend
dockerfile: ../docker/client.Dockerfile.dev
image: tooljet-client:development
volumes:
- ./frontend:/app:delegated
- /app/node_modules/
ports:
- 8082:8082
environment:
- WEBPACKER_DEV_SERVER_HOST=0.0.0.0
- NODE_ENV=development
command: ['npm', 'start']
server:
build:
context: .
dockerfile: ./docker/server.Dockerfile.dev
image: tooljet-server:development
depends_on:
- postgres
volumes:
- ./server:/app:delegated
- /app/node_modules/
ports:
- 3000:3000
environment:
- SERVE_CLIENT=false
command: npm run start:dev
postgres:
image: postgres:13
restart: always
ports:
- 5432:5432
volumes:
- postgres:/data/postgres
environment:
- POSTGRES_PASSWORD=postgres
volumes:
postgres:
node_modules:
cache: