kpeiruza / docker-hashtopolis-server Goto Github PK
View Code? Open in Web Editor NEWHastopolis Server Docker image
License: GNU General Public License v3.0
Hastopolis Server Docker image
License: GNU General Public License v3.0
playing a bit around with your hashtopolis docker server, but the stable version I have no problems connecting new agents with a voucher. The latest version just doesn't except any voucher.
When using a non existent voucher I get the correct answer from the hashtopolis server;
Registering failed: {'action': 'register', 'response': 'ERROR', 'message': 'Provided voucher does not exist.'}
But with a voucher that does exists;
No token found! Please enter a voucher to register your agent:
floating
{'action': 'register', 'voucher': 'floating', 'name': 'some_host_name'}
Resetting dropped connection: hashtopolis-server
http://hashtopolis-server:80 "POST /api/server.php HTTP/1.1" 500 0
Status code from server: 500
Request failed!
Even with the setting on that voucher doesn't expire. Might be related to the resetting dropped connection, but odd that I only get that on a good voucher (agent is ubuntu 18,04). Also I have not setup the latest version of hashtopolis outside docker, so it might be related not to your docker project.
Hey,
I might be bit noob in docker world and that might be problem number1.
But me and my friend have successfully installed docker for first time and everything is working fine until we reboot server and start container again. It will only loop and generate error that database with name Hashtopolis is already created and cannot be created again. After that container crashes.
How do we can edit container so it does not try to create new DB after rebooting?
New Docker image pushed, Hashtopolis has been updated as well, please try it out
The new image works just fine.
However, updating from 0.12 to 0.13 by removing the container and spinning up a new one using the new image doesn't. You have to throw everything away in order to do that, though I don't understand why. Removing the container and spinning up a new one on top of the persistent volumes with a new image results in a blank webpage. Spinning up a completely new instance works.
I am trying to get this up and running with docker compose, here is my docker-compose.yml
version: '3'
services:
hash_mysql:
container_name: hash_mysql
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: verySecret
hastopolis:
container_name: hashtopolis
image: kpeiruza/hashtopolis
environment:
H8_USER: root
H8_PASS: verySecret
H8_EMAIL: root@localhost
links:
- hash_mysql:mysql
ports:
- "80:80"
I am getting the error:
Failed connecting to the database.... Sleeping 5s and retrying 11 more.
I thought this might be an issue with my compose setup (which it still may be) but I have tried running with the basic setup listed in the readme:
docker run --name mydb -e MYSQL_ROOT_PASSWORD=PleaseChangeMe -d mysql:5.7
docker run --link mydb:mysql -d -p 80:80 kpeiruza/hashtopolis
and I get the same error.
Is this an issue with my setup?
System:
Ubuntu 20.04.1 LTS
docker-compose version 1.25.0, build unknown
Docker version 19.03.8, build afacb8b7f0
added an nginx proxy config to wrap it in ssl for remote agents - behavior is the same using this or not, both ports are exposed locally.
Either a system update broke this, or the updated image, and I just didnt notice.
docker-compose.yaml
version: '3.7'
services:
mysql:
image: mysql:5.7
volumes:
- mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: anotherpw
restart: unless-stopped
hashtopolis:
image: kpeiruza/hashtopolis:latest
environment:
H8_USER: root
H8_PASS: somepw
H8_EMAIL: root@localhost
MYSQL_HOST: mysql
MYSQL_PORT: 3306
MYSQL_ROOT_PASSWORD: anotherpw
MYSQL_DB: hashtopolis
volumes:
- import:/var/www/html/import
- files:/var/www/html/files
- inc:/var/www/html/inc
- locks:/var/www/html/inc/utils/locks
ports:
- "8008:80"
restart: unless-stopped
nginx:
image: nginx:stable
container_name: production_nginx
volumes:
- './nginx/default.conf:/etc/nginx/conf.d/default.conf'
- './nginx/certs/ca.crt:/etc/nginx/certs/ca.crt'
- './nginx/certs/server.crt:/etc/nginx/certs/server.crt'
- './nginx/certs/server.key:/etc/nginx/certs/server.key'
ports:
- 8334:8334
restart: unless-stopped
volumes:
import: {}
files: {}
inc: {}
locks: {}
mysql: {}
When clicking an actual agent in agent lists:
PHP Fatal error: Uncaught Error: Undefined class constant 'CPU_UTIL' in /var/www/html/agents.php:91\nStack trace:\n#0 {main}\n thrown in /var/www/html/agents.php on line 91, referer: http://127.0.0.1:8008/agents.php
When clicking a task that is part of a hashlist
PHP Fatal error: Uncaught Error: Undefined class constant 'SET_STATUS_TIMER' in /var/www/html/inc/templating/Statement.class.php(190) : eval()'d code:1\nStack trace:\n#0 /var/www/html/inc/templating/Statement.class.php(190): eval()\n#1 /var/www/html/inc/templating/Statement.class.php(139): Statement->evalResult('$DTaskAction::S...', Array, false)\n#2 /var/www/html/inc/templating/Statement.class.php(92): Statement->renderVariable('[[$DTaskAction:...', Array, false)\n#3 /var/www/html/inc/templating/Statement.class.php(71): Statement->renderContent('\n <f...', Array)\n#4 /var/www/html/inc/templating/Statement.class.php(30): Statement->render(Array)\n#5 /var/www/html/inc/templating/Template.class.php(53): Statement->render(Array)\n#6 /var/www/html/tasks.php(427): Template->render(Array)\n#7 {main}\n thrown in /var/www/html/inc/templating/Statement.class.php(190) : eval()'d code on line 1, referer: https://127.0.0.1:8334/hashlists.php?id=2
I wasn't able to connect to my database with my docker compose file. I received the error: "php_network_getaddresses: getaddrinfo failed: Name or service not known"
I ended up having to hard code my database parameters into /var/www/html/inc/conf.php and setting the INSTALL mode to false. Following this I was able to establish a DB connection and complete setup.
Here's the compose file (usernames and passwords intentionally blanked out):
version: '3.3'
services:
hashtopolis:
container_name: hashtopolis
image: kpeiruza/hashtopolis:latest
restart: unless-stopped
environment:
MYSQL_HOST: mariadb10
MYSQL_PORT: 3306
MYSQL_DB: hashtopolis
MYSQL_USER:
MYSQL_PASSWORD:
H8_USER:
H8_PASS:
H8_EMAIL: root@localhost
volumes:
- hashtopolis_import:/var/www/html/import
- hashtopolis_files:/var/www/html/files
- hashtopolis_inc:/var/www/html/inc
- hashtopolis_locks:/var/www/html/inc/utils/locks
expose:
- '80/tcp'
volumes:
hashtopolis_import:
name: hashtopolis_import
hashtopolis_files:
name: hashtopolis_files
hashtopolis_inc:
name: hashtopolis_inc
hashtopolis_locks:
name: hashtopolis_locks
networks:
default:
external:
name: nginx-proxy
Hi!
Can you build and update the docker hub image for ARM devices (odroid, raspberry, etc)?
Right now the image on dockerhub can be used only on x86 arch
EDIT: Thank you for the work :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.