Skip to content
Open
Show file tree
Hide file tree
Changes from 14 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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ DEFAULT_HOST_SECRET=8201e33f60093f2ce49f1abe6be8*****
URL_LIST=[{"name":"localhost","url":"http://localhost","priority":4},{"name":"github.com","url":"https://github.com","priority":4}]
ZBX_CONFIG={"authentication_type":0,"ok_period":"1d"}
ZBX_ADMIN_USERS=[{"name":"user","password":"password"},{"name":"user1","password":"password"}]
GF_SECURITY_ADMIN_PASSWORD=grafana
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
- docker build -t ${TESTS_IMAGE} -f tests/Dockerfile ./tests/

script:
- docker-compose stop -t 0 && sudo rm -f ./data/
- cp .env.example .env
- docker-compose stop -t 0 && sudo rm -f ./data/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я понял, почему так сделано, но docker-compose.yml должен быть разработанный таким образом, чтобы .env не был обязательным. Он должен быть опциональным.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в .env файле хранится пароль от графаны, который тянется в саму графану и в конфигуратор. Мне показалось что вариант хранения пароля в docker-compose.yml неправильный. Но только что я придумал ещё один вариант реализации... хм... Позже внесу его.

- sudo ./x-setup-server.sh
- docker images
- docker ps -a
Expand Down
7 changes: 7 additions & 0 deletions Dockerfile.grafana
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM grafana/grafana:latest
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Всегда фиксируем версию базового образа, никогда не привязываемся к latest

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сделал


USER root

ENV GF_INSTALL_PLUGINS=alexanderzobnin-zabbix-app

RUN chown -R grafana:grafana /etc/grafana
37 changes: 19 additions & 18 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.network "private_network", ip: "192.168.33.102"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "forwarded_port", guest: 3000, host: 3000
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
end
Expand All @@ -16,24 +17,24 @@ Vagrant.configure("2") do |config|
# Set our native time zone in VM
ln -sf /usr/share/zoneinfo/Europe/Kiev /etc/localtime
# mc repo
echo "deb http://www.tataranovich.com/debian $(lsb_release -cs) main" > /etc/apt/sources.list.d/mc.list
apt-key adv --keyserver pool.sks-keyservers.net --recv-keys 0x836CC41976FB442E
apt-get update
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-key fingerprint 0EBFCD88
apt-get update
apt-get install -y \
docker-ce \
iotop \
htop \
mc
#
#echo "deb http://www.tataranovich.com/debian $(lsb_release -cs) main" > /etc/apt/sources.list.d/mc.list
#apt-key adv --keyserver pool.sks-keyservers.net --recv-keys 0x836CC41976FB442E
#apt-get update
#apt-get install -y \
# apt-transport-https \
# ca-certificates \
# curl \
# software-properties-common
#curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
#add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
#apt-key fingerprint 0EBFCD88
#apt-get update
#apt-get install -y \
# docker-ce \
# iotop \
# htop \
# mc

echo "Getting docker-compose from official repository..."
if [ ! -e "/usr/local/bin/docker-compose" ]; then
curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
Expand Down
Loading