diff --git a/README.md b/README.md index 630db31..f43f20e 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,34 @@ To run the captive portal, you will need: docker run -d \ -p 80:3000 \ --env-file .env \ - carlgo11/guest-portal: + 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. @@ -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