Please review first ever services config (bridge network) and edition of docker run cl for Tracim app

Hosting provider : OVH
Machine : remote VPS
Server : Apache2.4
OS distro : Ubuntu 22.04 LTS
App image : algoo/tracim:latest
DB server : MariaDB
Network : Docker default bridge Network


I am about to execute following “docker run“ command line, but being newbie to docker, I’d like someone to review it and tell if it is correctly edited and functional to run app container of choice, depending external MariaDB server through connection over default bridge network :

docker run --env-file /tracim/.env_named -p 8080:80 - p 3306:3306 -v ~/tracim/etc:/etc/tracim -v ~/tracim/var:/var/tracim algoo/tracim

So to allow whoever wishing to help, the above “docker run“ command line may be reviewed based on here below 5 steps (each one showing how it renders the “docker run“ command line getting build), to configure both the app container and the MariaDB server (on same host).

I’ll be thankful too, to get replies to simple questions ending this post


STEP 1 : I did successfully install docker via shell
• sub-step : verify that docker is running - OK
• sub-step : connect and disconnect to docker via terminal using my docker hub account credentials - OK
• sub-step : get my host’s docker IP ADRESS to allow its remote access from container with docker default bridge mode : (next on step 3)
°°° editing cl °°°°
docker run -p 8080:80

STEP 2 : I did install tracim volumes and pull algoo/tracim image via shell, as non-root user (su -)
• sub-step : locate created volumes in Ubuntu OS file system - OK
°°° editing cl °°°°
docker run -p 8080:80 ……. -v ~/tracim/etc:/etc/tracim -v ~/tracim/var:/var/tracim algoo/tracim
°°° source °°°°°°

STEP 3 : I did create and setup database and user on my host (VPS)
• sub-step : grant all privileges to new user on new database, with remote access from any host (%) - OK
• sub-step : change MariaDB server bind-address to host’s docker IP ADDRESS ““ - OK
°°° editing cl °°°°
docker run ……. - p 3306:3306 -p 8080:80 -v ~/tracim/etc:/etc/tracim -v ~/tracim/var:/var/tracim algoo/tracim

STEP 4 : I did create .env file in tracim container root directory
• sub-step : extend the .env with a specific name : # sudo nano ./tracim/.env_named - OK
• sub-step : set the .env_named file with the above created MariaDB database environment variable, such as
°°° editing cl °°°°
docker run --env-file /tracim/.env_named -p 8080:80 - p 3306:3306 -v ~/tracim/etc:/etc/tracim -v ~/tracim/var:/var/tracim algoo/tracim
°°° source °°°°°°

STEP 5 : set firewall (ufw) to allow container’s IP ADRESS to listen on port 3306
• sub-step : verify from cpanel that port 3306 is allowed in firewall - OK
• sub-step : allow traffic and matching between container’s IP ADDRESS and MariaDB server port 3306 (MISSING)
(the container’s IP ADDRESS may only be collected after that the container was run at least once)

Q1 : does final “docker run“ command line (step 4) miss configuration parameters, e.g host’s docker IP ?
Q2 : does final “docker run“ command line (step 4) contains parameters that are unnecessary ?
Q3 : is .env_named file (step 4) is correctly configured with on host database environment variable (MariaBD)?
Q4 : may execution of above “docker run“ command line fails because of step 5 (ufw) being unachieved ?


Does it mean that you haven’t executed it yet and you are waiting for someone to tell you that you can execute it as is?

Does it fail?

I am not sure whether you have a specific error and need help to solve it or you just wanted to share you first project and ask for recommendations for optimizing it.

If you could format your post according to the below topic that could make the post clearer.