Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to docker-compose and http authentication #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ZAPIX_USERNAME=zapix
ZAPIX_PASSWORD=zapix
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ and it will offer only API methods and documentation related for connected Zabbi
version, however you can use still write older/newer methods manually. All
credentials are stored in your browser only. See [examples](#examples).

If you want to use Docker, just build and run the image locally:
- If you want to use Docker, just build and run the image locally:
```shell
docker build -t monitoringartist/zapix .
docker run -p 8080:80 -d monitoringartist/zapix
```

```shell
docker build -t monitoringartist/zapix .
docker run -p 8080:80 -d monitoringartist/zapix
```
- If you want to use Docker-compose with some basic http authentication (change user and password in .env file or use zapix/zapix), just run:
```shell
docker-compose up -d
```

- After this, you can access http://localhost:8080 in your browser.

After this, you can access http://localhost:8080 in your browser.

## Quick start

Expand Down
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3'
services:
nginx:
image: quay.io/dtan4/nginx-basic-auth-proxy:latest
ports:
- 8080:80
environment:
- BASIC_AUTH_USERNAME=${ZAPIX_USERNAME}
- BASIC_AUTH_PASSWORD=${ZAPIX_PASSWORD}
- PROXY_PASS=http://zapix/
zapix:
container_name: zapix
hostname: zapix
restart: unless-stopped
build:
context: ./
expose:
- 80