This commit is contained in:
@@ -2,8 +2,6 @@ name: Publish Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
@@ -32,9 +30,8 @@ jobs:
|
||||
with:
|
||||
images: git.lzstealth.com/LZStealth/pulse-signage
|
||||
tags: |
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
type=raw,value=latest
|
||||
type=ref,event=tag
|
||||
type=sha
|
||||
|
||||
- name: Build and push image
|
||||
uses: docker/build-push-action@v6
|
||||
|
||||
@@ -63,33 +63,17 @@ The app reads its settings from environment variables.
|
||||
|
||||
- `PLAYER_PORT` - player port, default `3001`
|
||||
|
||||
## Using Docker
|
||||
## Docker Compose
|
||||
|
||||
The recommended way to run the project is with Docker Compose.
|
||||
The repository includes a `docker-compose.yml` file that starts three services:
|
||||
|
||||
```bash
|
||||
npm run docker:up
|
||||
```
|
||||
- `webui` - the admin app on port `3000`
|
||||
- `player` - the signage player on port `3001`
|
||||
- `mysql` - the database on port `3306`
|
||||
|
||||
The main Compose file now uses the published Docker image and still reads values from the repository `.env` file. `DB_HOST` comes from that file for the app containers, so you can point the web UI and player at an external database host or change it to `mysql` if you want to use the bundled MySQL service.
|
||||
By default, `webui` and `player` use the published image from `git.lzstealth.com/LZStealth/pulse-signage:latest`. You can point both services at a specific release by setting `PULSE_SIGNAGE_IMAGE` to a tagged image such as `git.lzstealth.com/LZStealth/pulse-signage:v1.0.0`.
|
||||
|
||||
If you only want to test the image build from the current checkout without using Compose, run:
|
||||
|
||||
```bash
|
||||
npm run docker:build
|
||||
```
|
||||
|
||||
To publish the Docker image to the Gitea container registry, push to `main` or create a `v*` tag. The workflow in [.gitea/workflows/docker-publish.yml](.gitea/workflows/docker-publish.yml) builds `git.lzstealth.com/LZStealth/pulse-signage` and pushes `latest`, `sha`, and tagged releases.
|
||||
|
||||
This starts:
|
||||
|
||||
- the web admin app on port `3000`
|
||||
- the player app on port `3001`
|
||||
- MySQL on port `3306`
|
||||
|
||||
The web app and player app share the same uploaded media volume, so files uploaded in the admin UI are available to the player.
|
||||
|
||||
If you want to stop the stack later, run `npm run docker:down`. To follow logs, run `npm run docker:logs`.
|
||||
The Compose file also defines a shared `uploads` volume for media and a `mysql_data` volume for database persistence.
|
||||
|
||||
## Important Notes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user