mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
build: refactor production containers
Production containers now copy the Zeppelin source files at build-time rather than using a shared volume. This means fewer permission issues and backend/dashboard builds only have to run once at build-time, not every time the containers are started. Docs in PRODUCTION.md have been updated accordingly.
This commit is contained in:
parent
b60a7fb145
commit
b67b3c35b7
8 changed files with 60 additions and 64 deletions
|
@ -5,7 +5,8 @@ Zeppelin's production environment - that is, the **bot, API, and dashboard** - u
|
|||
1. Install Docker on the machine running the bot
|
||||
2. Make a copy of `.env.example` called `.env`
|
||||
3. Fill in the missing values in `.env`
|
||||
4. Run `docker compose -f docker-compose.production.yml up -d`
|
||||
4. Run `docker compose -f docker-compose.production.yml build`
|
||||
5. Run `docker compose -f docker-compose.production.yml up -d`
|
||||
|
||||
**Note:** The dashboard and API are exposed with a self-signed certificate. It is recommended to set up a proxy with a proper certificate in front of them. Cloudflare is a popular choice here.
|
||||
|
||||
|
@ -15,18 +16,17 @@ Zeppelin's production environment - that is, the **bot, API, and dashboard** - u
|
|||
If you've downloaded the bot's files by cloning the git repository, you can use `update.sh` to update the bot.
|
||||
|
||||
### Manual instructions
|
||||
1. Shut the bot down: `docker compose -f docker-compose.production.yml stop`
|
||||
1. Shut the bot down: `docker compose -f docker-compose.production.yml down`
|
||||
2. Update the files (e.g. `git pull`)
|
||||
3. Start the bot again: `docker compose -f docker-compose.production.yml start`
|
||||
3. Build new images: `docker compose -f docker-compose.production.yml build`
|
||||
3. Start the bot again: `docker compose -f docker-compose.production.yml up -d`
|
||||
|
||||
### Ephemeral hotfixes
|
||||
If you need to make a hotfix to the bot's source files directly on the server:
|
||||
1. Shut the bot down: `docker compose -f docker-compose.production.yml stop`
|
||||
1. Shut the bot down: `docker compose -f docker-compose.production.yml down`
|
||||
2. Make your edits
|
||||
3. Start the bot again: `docker compose -f docker-compose.production.yml start`
|
||||
|
||||
Note that you can't edit the compiled files directly as they're overwritten when the environment starts.
|
||||
Only edit files in `/backend/src`, `/shared/src`, and `/dashboard/src`.
|
||||
3. Build new images: `docker compose -f docker-compose.production.yml build`
|
||||
4. Start the bot again: `docker compose -f docker-compose.production.yml up -d`
|
||||
|
||||
Make sure to revert any hotfixes before updating the bot normally.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue