diff --git a/.env b/.env new file mode 100644 index 0000000..689e63a --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +ZAPIX_USERNAME=zapix +ZAPIX_PASSWORD=zapix diff --git a/README.md b/README.md index 5c53b97..aad6742 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e06e4a1 --- /dev/null +++ b/docker-compose.yml @@ -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