This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
generated from homecentr/docker-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
1,063 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,44 @@ | ||
FROM alpine | ||
FROM grafana/grafana:7.0.3 as original | ||
|
||
FROM homecentr/base:2.4.0-alpine | ||
|
||
ENV PATH="/usr/share/grafana/bin:$PATH" | ||
ENV GF_PATHS_CONFIG="/config/grafana.ini" | ||
ENV GF_PATHS_PROVISIONING="/config/provisioning" | ||
ENV GF_PATHS_DATA="/grafana" | ||
ENV GF_PATHS_PLUGINS="/grafana/plugins" | ||
ENV GF_PATHS_LOGS="/logs" | ||
ENV GF_PATHS_HOME="/usr/share/grafana" | ||
ENV HEALTHCHECK_ENDPOINT="/metrics" | ||
|
||
COPY --from=original /usr/share/grafana /usr/share/grafana | ||
COPY --from=original /run.sh /run.sh | ||
|
||
COPY ./fs/ / | ||
|
||
RUN apk add --no-cache curl=7.67.0-r0 | ||
|
||
RUN mkdir -p "$GF_PATHS_PROVISIONING/datasources" \ | ||
"$GF_PATHS_PROVISIONING/dashboards" \ | ||
"$GF_PATHS_PROVISIONING/notifiers" \ | ||
"$GF_PATHS_LOGS" \ | ||
"$GF_PATHS_PLUGINS" \ | ||
"$GF_PATHS_DATA" && \ | ||
cp "$GF_PATHS_HOME/conf/sample.ini" "$GF_PATHS_CONFIG" && \ | ||
cp "$GF_PATHS_HOME/conf/ldap.toml" /config/ldap.toml && \ | ||
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" | ||
|
||
# Configuration | ||
VOLUME "/config" | ||
|
||
# Service state | ||
VOLUME "/grafana" | ||
|
||
# Log files | ||
VOLUME "/logs" | ||
|
||
# Ping the metrics endpoint | ||
HEALTHCHECK --interval=15s --timeout=10s --start-period=20s --retries=3 CMD curl -k --fail http://127.0.0.1:3000/$HEALTHCHECK_ENDPOINT || exit 1 | ||
|
||
# HTTP User interface and API | ||
EXPOSE 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,55 @@ | ||
[![Project status](https://badgen.net/badge/project%20status/stable%20%26%20actively%20maintaned?color=green)](https://github.com/homecentr/docker-$$IMAGE_NAME$$/graphs/commit-activity) [![](https://badgen.net/github/label-issues/homecentr/docker-$$IMAGE_NAME$$/bug?label=open%20bugs&color=green)](https://github.com/homecentr/docker-$$IMAGE_NAME$$/labels/bug) [![](https://badgen.net/github/release/homecentr/docker-$$IMAGE_NAME$$)](https://hub.docker.com/repository/docker/homecentr/$$IMAGE_NAME$$) | ||
[![](https://badgen.net/docker/pulls/homecentr/$$IMAGE_NAME$$)](https://hub.docker.com/repository/docker/homecentr/$$IMAGE_NAME$$) | ||
[![](https://badgen.net/docker/size/homecentr/$$IMAGE_NAME$$)](https://hub.docker.com/repository/docker/homecentr/$$IMAGE_NAME$$) | ||
[![Project status](https://badgen.net/badge/project%20status/stable%20%26%20actively%20maintaned?color=green)](https://github.com/homecentr/docker-grafana/graphs/commit-activity) [![](https://badgen.net/github/label-issues/homecentr/docker-grafana/bug?label=open%20bugs&color=green)](https://github.com/homecentr/docker-grafana/labels/bug) [![](https://badgen.net/github/release/homecentr/docker-grafana)](https://hub.docker.com/repository/docker/homecentr/grafana) | ||
[![](https://badgen.net/docker/pulls/homecentr/grafana)](https://hub.docker.com/repository/docker/homecentr/grafana) | ||
[![](https://badgen.net/docker/size/homecentr/grafana)](https://hub.docker.com/repository/docker/homecentr/grafana) | ||
|
||
![CI/CD on master](https://github.com/homecentr/docker-$$IMAGE_NAME$$/workflows/CI/CD%20on%20master/badge.svg) | ||
![Regular Docker image vulnerability scan](https://github.com/homecentr/docker-$$IMAGE_NAME$$/workflows/Regular%20Docker%20image%20vulnerability%20scan/badge.svg) | ||
![CI/CD on master](https://github.com/homecentr/docker-grafana/workflows/CI/CD%20on%20master/badge.svg) | ||
![Regular Docker image vulnerability scan](https://github.com/homecentr/docker-grafana/workflows/Regular%20Docker%20image%20vulnerability%20scan/badge.svg) | ||
|
||
|
||
# HomeCentr - $$IMAGE_NAME$$ | ||
# HomeCentr - grafana | ||
|
||
Repack of [Grafana](https://grafana.com/) with the usual Homecentr bells and whistles. | ||
|
||
## Usage | ||
|
||
```yml | ||
version: "3.7" | ||
services: | ||
$$IMAGE_NAME$$: | ||
grafana: | ||
build: . | ||
image: homecentr/$$IMAGE_NAME$$ | ||
image: homecentr/grafana | ||
ports: | ||
- 3000:3000 | ||
volumes: | ||
- ./example:/config | ||
``` | ||
## Environment variables | ||
| Name | Default value | Description | | ||
|------|---------------|-------------| | ||
| PUID | 7077 | UID of the user $$IMAGE_NAME$$ should be running as. | | ||
| PGID | 7077 | GID of the user $$IMAGE_NAME$$ should be running as. | | ||
| PUID | 7077 | UID of the user grafana should be running as. | | ||
| PGID | 7077 | GID of the user grafana should be running as. | | ||
| | ||
## Exposed ports | ||
| Port | Protocol | Description | | ||
|------|------|-------------| | ||
| 80 | TCP | Some useful details | | ||
| 3000 | TCP | Web UI and API. | | ||
## Volumes | ||
| Container path | Description | | ||
|------------|---------------| | ||
| /config | Some useful details | | ||
| /config | Grafana configuration. This should container the `grafana.ini` configuration file. If you want to use [provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/), put the related files to `/config/provisioning`. | | ||
| /grafana | Grafana state. Make sure the volume is writable for PUID/PGID. | | ||
| /logs | Log files produced by Grafana if configured to. Make sure the volume is writable for PUID/PGID. | | ||
|
||
## Security | ||
The container is regularly scanned for vulnerabilities and updated. Further info can be found in the [Security tab](https://github.com/homecentr/docker-$$IMAGE_NAME$$/security). | ||
The container is regularly scanned for vulnerabilities and updated. Further info can be found in the [Security tab](https://github.com/homecentr/docker-grafana/security). | ||
|
||
### Container user | ||
The container supports privilege drop. Even though the container starts as root, it will use the permissions only to perform the initial set up. The $$IMAGE_NAME$$ process runs as UID/GID provided in the PUID and PGID environment variables. | ||
The container supports privilege drop. Even though the container starts as root, it will use the permissions only to perform the initial set up. The grafana process runs as UID/GID provided in the PUID and PGID environment variables. | ||
|
||
:warning: Do not change the container user directly using the `user` Docker compose property or using the `--user` argument. This would break the privilege drop logic. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
version: "3.7" | ||
services: | ||
$$IMAGE_NAME$$: | ||
grafana: | ||
build: . | ||
image: homecentr/$$IMAGE_NAME$$ | ||
restart: unless-stopped | ||
image: homecentr/grafana | ||
ports: | ||
- 3000:3000 | ||
volumes: | ||
- ./example:/config |
Oops, something went wrong.