I collected all in one container but I have only amd64 architecture. So if it suits for you, you can run it with next options.
docker pull typicalname/dashboard
docker run -d -p 80:80 typicalname/dashboard:latest
Open link in the browser http://ip_server/install and choose Create DB
On DB info page fill all forms as in example. Admin page fill as you wish and choose submit.
Choose complete and then open link in browser http://ip_server
1 Like
Alexey
January 14, 2023, 8:36am
22
Perhaps you need to add some --mount
options to store database not in ephemeral container.
For another architecture you can build it on your server.
Create empty dir and go trough
mkdir dashboard && cd dashboard
Create Dockerfile, entrypoint.sh, nginx.conf with next context
Dockerfile
FROM php:8.1-fpm-alpine
RUN apk add --no-cache mariadb mariadb-client nginx git && \
docker-php-ext-install mysqli && \
git clone https://github.com/storjdashboard/storjdashboard-internal.git && \
mv ./storjdashboard-internal/web/* ./ && \
rm -R storjdashboard-internal && \
chown -R www-data ../html && \
mkdir /usr/data && \
chown -R mysql:mysql /usr/data && \
mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql && \
mv /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini && \
sed -i 's/mysqli.default_socket =/mysqli.default_socket = \/run\/mysqld\/mysqld.sock/g' /usr/local/etc/php/php.ini
COPY nginx.conf /etc/nginx/nginx.conf
WORKDIR /var/www/html
COPY entrypoint.sh /etc/entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/etc/entrypoint.sh"]
entrypoint.sh
#!/usr/bin/env sh
mysqld_safe &
sleep 5
if [ -d /var/lib/mysql/dashboard ]; then
echo "Database already exist"
else
mysql -e "CREATE DATABASE storj_dashboard;"
mysql -e "GRANT ALL ON storj_dashboard.* TO 'storj'@'localhost' IDENTIFIED BY 'pa55w0rd!' WITH GRANT OPTION;"
mysql -e "FLUSH PRIVILEGES;"
fi
nginx
php-fpm
nginx.conf
user www-data;
worker_processes auto;
pcre_jit on;
error_log /var/log/nginx/error.log warn;
include /etc/nginx/modules/*.conf;
include /etc/nginx/conf.d/*.conf;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_tokens off;
client_max_body_size 1m;
sendfile on;
tcp_nopush on;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:2m;
ssl_session_timeout 1h;
ssl_session_tickets off;
gzip_vary on;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
server {
listen 80;
server_name localhost;
root /var/www/html;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include fastcgi.conf;
fastcgi_pass localhost:9000;
}
location ~ /\.ht {
deny all;
}
}
}
Give execute permissions for entrypoint.sh
chmod +x entrypoint.sh
Build image
docker build -t dashboard .
Run dashboard image
docker run -d -p 80:80 typicalname/dashboard:latest
Open link in the browser http://ip_server/install and choose Create DB
On DB info page fill all forms as in example. Admin page fill as you wish and choose submit.
Choose complete and then open link in browser http://ip_server
1 Like
Yep but for that moment it look like a beta test
P.S. If any one want to save db stat add
-v /local/path/todbfolder:/var/lib/mysql
before image name
1 Like
Update v1.0.0.6
Docker Log : Storj Node Stats
Daily Summary for individual nodes (updated)
1 Like
Zoncko
March 4, 2023, 8:15pm
26
Any way of using this on truenas??
Hi @Zoncko
If you have the ability to have Jails / VMs - then definitely possible.
Cheers
Hass
Zoncko
March 8, 2023, 2:56am
28
Does not seem to be the case with truenas scale sadly
I have now made a docker-compose for this project.
You will be able to see this in the same GitHub account , or on below link.
I have created an install-files file which creates all the required files for it to work.
Iām fairly new to creating something that works in docker, so happy for feedback
4 Likes
this looks snazzy I had missed this.
when setting up to control docker nodesā¦ i guess each node on a system would need a different port for the agent specified with the -H in the docker compose setup?
Hi @EasyRhino
I have this link which gives some guidance around thisā¦
#Docs - StorjDashboard
let me know if you need any more information and will try to help you out
Hass
Is there a way to just use a yaml file or do I have to run the script?
the install_files.sh does create a yaml file. You can just skip the ārun setup.shā
I looked into the sript file, and it looks like I could just copy the yaml part out of it. If running the script, does it create a stack in docker, so I maybe could change it afterwards?
You should be able to do that no problemā¦ - Iām not sure if there is any other dependancies ā¦ Worth testing as iām not 100% with these docker things I had help creating this one, although seemed simple, Iām not sure of the intricies of it
If it works just with yaml, let us know so others will know