Skip to content

Commit

Permalink
Add Docker Compose documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlgo11 committed May 20, 2024
1 parent 1d25509 commit 0b32e58
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,34 @@ To run the captive portal, you will need:
docker run -d \
-p 80:3000 \
--env-file .env \
carlgo11/guest-portal:<tag>
carlgo11/guest-portal
```
4. Access the captive portal through the webserver's URL.
### Deploying with Docker Compose
1. Create a `.env` file with the environment variables found under [#Configuration](Configuration).
2. Create a `docker-compose.yml` file with the following data:
```yaml
version: '3.8'
services:
redis:
image: redis/redis-stack-server:latest
ports:
- "6379:6379"
volumes:
- redis:/data
node:
image: carlgo11/guest-portal
ports:
- 3001:3000
env_file: .env
volumes:
redis:
```
### Creating background images _(Optional)_
By default, the captive portal fetches the Bing Image of the Day to use as the background.
Expand Down Expand Up @@ -60,6 +84,27 @@ If you wish to use this, follow these steps:
+ -v $(pwd)/backgrounds:/app/public/img/backgrounds \
carlgo11/guest-portal
```
If using Docker Compose, link the directory by adding the following lines to `docker-compose.yml`:
```diff
version: '3.8'
services:
redis:
image: redis/redis-stack-server:latest
ports:
- "6379:6379"
volumes:
- redis:/data
node:
image: carlgo11/guest-portal
+ volumes:
+ - ./backgrounds:/app/public/img/background
ports:
- 3001:3000
env_file: .env
volumes:
redis:
```

#### Static backgrounds

Expand Down

0 comments on commit 0b32e58

Please sign in to comment.