C++ backend with QxOrm library and MariaDB database
10K+
This Docker compose file builds a development environment to create web applications with very efficient C++ backend based on Qt framework and QxOrm library.
This Docker compose file defines an application with 4 services :

cd <path_to_this_docker_compose_file>
docker compose up -d
[+] Running 8/8
✔ Network compose_qxorm_with_mariadb_compose_qxorm_with_mariadb_frontnet Created 0.1s
✔ Network compose_qxorm_with_mariadb_compose_qxorm_with_mariadb_backnet Created 0.0s
✔ Volume "compose_qxorm_with_mariadb_qxorm_backend_src" Created 0.0s
✔ Volume "compose_qxorm_with_mariadb_mariadb_db_data" Created 0.0s
✔ Container compose_qxorm_with_mariadb-db_mariadb-1 Started 1.7s
✔ Container compose_qxorm_with_mariadb-frontend_html_js_css-1 Started 1.7s
✔ Container compose_qxorm_with_mariadb-backend_qxorm-1 Started 1.9s
✔ Container compose_qxorm_with_mariadb-nginx_reverse_proxy-1 Started 1.2s
Listing containers should show 4 containers running and the port mapping as below :
docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
compose_qxorm_with_mariadb-backend_qxorm-1 qxorm/compose_qxorm_with_mariadb-backend_qxorm:latest "./entrypoint.sh ssh…" backend_qxorm About a minute ago Up About a minute 9642-9643/tcp, 0.0.0.0:2222->22/tcp
compose_qxorm_with_mariadb-db_mariadb-1 qxorm/compose_qxorm_with_mariadb-db_mariadb:latest "docker-entrypoint.s…" db_mariadb About a minute ago Up About a minute 3306/tcp
compose_qxorm_with_mariadb-frontend_html_js_css-1 qxorm/compose_qxorm_with_mariadb-frontend_html_js_css:latest "./entrypoint.sh" frontend_html_js_css About a minute ago Up About a minute 80/tcp
compose_qxorm_with_mariadb-nginx_reverse_proxy-1 qxorm/compose_qxorm_with_mariadb-nginx_reverse_proxy:latest "./entrypoint.sh" nginx_reverse_proxy About a minute ago Up About a minute (healthy) 80/tcp, 0.0.0.0:8080-8081->8080-8081/tcp
Once Docker containers are running, on the host machine open a web-browser and go to :
http://localhost:8080

The sample application is qxBlogRestApi based on QxOrm library. You can select a pre-defined request to send to the C++ backend in JSON format, or you can write your own JSON request. The JSON API is explained in QxOrm documentation.
The C++ Qt QxOrm backend is based on this Docker file. A full C++ development environment (to build and debug) is available, you can connect to this dev environment with Visual Studio Code. Visual Studio Code provides 2 extensions : Dev Containers extension and Remote SSH extension (choose one of them).
To connect to the C++ development environment with the Dev Containers extension :
To connect to the C++ development environment with the Remote SSH extension :
ssh qxorm@localhost -p 2222
/home/qxorm/src/QxOrm/
Once connected to the remote C++ development environment (with Dev Containers extension or Remote SSH extension) :
- Press 'CTRL+SHIFT+B' to build the project in debug mode
- Press 'F5' to execute the project in debug mode
After the application starts in DEBUG mode, on the host machine open a web-browser and go to :
http://localhost:8081
docker compose down
QxOrm library is a C++ library based on Qt framework, its main features are : ORM persistence, serialization, reflection, introspection, JSON API, HTTP web server. QxOrm library supports most common databases like SQLite, MySQL, PostgreSQL, Oracle, MS SQL Server, MongoDB, MariaDB. QxOrm library documentation : https://www.qxorm.com/qxorm_en/manual.html
QxEntityEditor application (available on Windows, Linux and macOS) is a graphic editor for QxOrm library. QxEntityEditor provides a graphic way to manage the data model, and generates native source code for all environments. QxEntityEditor is based on plugins and provides many ways to import/export your data model :

QxOrm is developed by Lionel Marty, a software development engineer since 2003.
QxOrm is a C++ library available under a dual license :
Content type
Image
Digest
sha256:91b5e1423…
Size
101.8 MB
Last updated
5 months ago
docker pull qxorm/compose_qxorm_with_mariadb-db_mariadb