-
Notifications
You must be signed in to change notification settings - Fork 8
Running in Docker (recommended)
Instead of manually setting up dependencies (MySQL database, web server with PHP support etc.), the whole system can be run in self-contained Docker containers. Here's documentation on how to install Docker Engine on Debian. You might also need to apt-get install docker-compose
.
Once Docker is installed, create a text file named "docker-compose.yml" (see example at the bottom of this page).
When you have created the file, open terminal and navigate to the folder where you put your docker-compose.yml file, and enter docker-compose up -d
. That's all you need to do, and Docker will take care of the rest. If for example your Docker host is on 192.168.1.10, the various webpages will now be available on these ports/addresses:
- Map: 192.168.1.10
- Tools for uploading data: 192.168.1.10/tools
- Bluetooth view: 192.168.1.10/bluetooth
- Database management: 192.168.1.10:8080 (login is root/password)
docker-compose.yml example:
version: "2"
services:
wifimap:
image: znerox/wifimap
hostname: wifimap
container_name: wifimap
restart: always
ports:
- 80:80
depends_on:
- wifimap-mysql
wifimap-phpmyadmin:
image: phpmyadmin/phpmyadmin
hostname: wifimap-phpmyadmin
container_name: wifimap-phpmyadmin
restart: always
ports:
- 8080:80
environment:
PMA_HOST: wifimap-mysql
depends_on:
- wifimap-mysql
wifimap-mysql:
image: mysql
hostname: wifimap-mysql
container_name: wifimap-mysql
restart: always
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: password
volumes:
db_data:
Useful Docker commands:
- bring up containers:
docker-compose up -d
(from same folder as docker-compose.yml) - bring down containers:
docker-compose down
(from same folder as docker-compose.yml) - list running containers:
docker ps
- list all containers:
docker ps -a
- update container (if update available):
docker pull znerox/wifimap
docker pull mysql
docker pull phpmyadmin/phpmyadmin
- list images:
docker images
- remove old image:
docker rmi image
replace image with IMAGE ID (you only need the first few characters)