existing timezone
timedatectl
set to AEST
sudo timedatectl set-timezone Australia/Sydney
sudo apt install docker.io -y
https://linuxhandbook.com/docker-permission-denied/
sudo groupadd docker
sudo systemctl enable --now docker
sudo usermod -aG docker $USER
# log out and log back in
# testing:
docker --version
docker run hello-world
docker run -it ubuntu bash
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
(sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose)
# create portainer_data volume if not done so
docker volume create portainer_data
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
# http://<host>:9000
eventlet
loguru
Dockerfile
docker-compose.yaml
project.env
on deployment:
change project.env
WEBSITE_HOST_PORT=80
HOST_VOLUME=/projects/L-Bot-server-main
for convenience:
build.sh
up.sh
down.sh
modify
WEBSITE_HOST_PORT
HOST_VOLUME
kill_port.py
if platform.system() == "Linux":
pass
database/website_client_interface.py
database/database_tasks.py
database/camera_system_interface.py
from loguru import logger
print = lambda *args : logger.debug(" ".join(str(i) for i in args))
website/templates/base.html
const sio = io("ws://<HOST_IP>:2910");
eg. const sio = io("ws://192.168.1.9:2910");
website/static/requests.js
website/static/style.css
span { /* something dodgy about it transitioning twice, this turns off one of the transitions */ transition-duration: 0s; }
# build.sh
docker build --tag 'l-bot' .
# up.sh
_UID=$(id -u) _GID=$(id -g) docker-compose --env-file project.env up --detach
# down.sh
_UID=$(id -u) _GID=$(id -g) docker-compose --env-file project.env down
# https://docs.docker.com/engine/reference/commandline/logs/
docker logs <CONTAINER_NAME>
containers are
l-bot_website
l-bot_website_client
l-bot_camera_snr
l-bot_camera_jnr
docker logs --follow l-bot_website
docker logs --follow l-bot_website_client
docker logs --tail 10 l-bot_website_client