mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
refactor: new dev/prod containers
- Use a single Dockerfile for all Zeppelin services - Add a Dockerfile in project root that can be used by app hosting services - Provide a standalone and lightweight prod setup - Standalone is the same as the old setup, with mysql+nginx - Lightweight only runs bot+backend+dash, no mysql/nginx - Remove mounted mysql data folders for dev and prod - This resolves permission issues caused by the mount - The mysql service uses a regular named volume now - Simplify .env options and clearly separate different prod setups - Remove update.sh - Different setups require different update procedures, so a common update.sh no longer works
This commit is contained in:
parent
730b8c1d6b
commit
509d96ce83
30 changed files with 948 additions and 274 deletions
60
docker-compose.lightweight.yml
Normal file
60
docker-compose.lightweight.yml
Normal file
|
@ -0,0 +1,60 @@
|
|||
version: '3'
|
||||
name: zeppelin-prod
|
||||
services:
|
||||
migrate:
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/production/zeppelin/Dockerfile
|
||||
environment:
|
||||
HOST_MODE: lightweight
|
||||
working_dir: /zeppelin
|
||||
command: ["npm", "run", "migrate-prod"]
|
||||
|
||||
api:
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/production/zeppelin/Dockerfile
|
||||
restart: on-failure
|
||||
environment:
|
||||
DEBUG: ${DEBUG-}
|
||||
HOST_MODE: lightweight
|
||||
ports:
|
||||
- "${LIGHTWEIGHT_API_PORT}:3001"
|
||||
working_dir: /zeppelin/backend
|
||||
command: ["npm", "run", "start-api-prod"]
|
||||
|
||||
bot:
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/production/zeppelin/Dockerfile
|
||||
restart: on-failure
|
||||
environment:
|
||||
DEBUG: ${DEBUG-}
|
||||
HOST_MODE: lightweight
|
||||
working_dir: /zeppelin/backend
|
||||
command: ["npm", "run", "start-bot-prod"]
|
||||
|
||||
dashboard:
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/production/zeppelin/Dockerfile
|
||||
restart: on-failure
|
||||
environment:
|
||||
DEBUG: ${DEBUG-}
|
||||
HOST_MODE: lightweight
|
||||
ports:
|
||||
- "${LIGHTWEIGHT_DASHBOARD_PORT}:3002"
|
||||
working_dir: /zeppelin/dashboard
|
||||
command: ["node", "serve.js"]
|
Loading…
Add table
Add a link
Reference in a new issue