Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Lokhy87/gymApp/llms.txt

Use this file to discover all available pages before exploring further.

GymFlow ships with a docker-compose.yml at the repository root that defines two services: a PHP 8.3 Apache container for the Symfony API and a MariaDB 10.11 container for the database. Both services join a dedicated bridge network called gymflow_network so they can reach each other by service name without exposing internal traffic to the host.

Prerequisites

Before you begin, make sure the following are installed on your machine:
  • Docker Engine 24.0 or later
  • Docker Compose v2 (bundled with Docker Desktop, or install the docker-compose-plugin package)
  • Git to clone the repository

Services

The Compose file defines the following services:
Container nameBuild / imageHost port → Container port
gymflow_php_serverBuilt from ./Dockerfile (PHP 8.3 Apache)80508000
gymflow_db_servermariadb:10.1133503306
Both containers are attached to the gymflow_network bridge network. Inside the network, the PHP container reaches the database at the hostname gymflow-db-server (the service name), not localhost. If you connect to MariaDB from a tool on your host machine, use localhost:3350.

Deploy GymFlow

1

Clone the repository

Clone the GymFlow repository and enter the project root.
git clone https://github.com/Lokhy87/gymApp.git
cd gymApp
The docker-compose.yml and Dockerfile live at the repository root. The backend/ directory is mounted into the PHP container at /var/www/html.
2

Review the Compose configuration

The docker-compose.yml at the root is the primary Compose file used for running the application:
version: '3.8'

services:
  gymflow-php-server:
    container_name: gymflow_php_server
    build:
      dockerfile: ./Dockerfile
      context: .
    restart: unless-stopped
    stdin_open: true
    links:
      - gymflow-db-server
    ports:
      - "8050:8000"
    volumes:
      - ./:/var/www/html:delegated
    networks:
      - gymflow_network

  gymflow-db-server:
    container_name: gymflow_db_server
    image: mariadb:10.11
    ports:
      - "3350:3306"
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: root
    volumes:
      - gymflow_db_mysql:/var/lib/mysql
    networks:
      - gymflow_network

volumes:
  gymflow_db_mysql:

networks:
  gymflow_network:
3

Build and start the containers

Build the PHP image and start both containers in detached mode:
docker compose up --build -d
On the first run, Docker downloads the php:8.3-apache base image and installs Composer, the Symfony CLI, Xdebug, and the PDO MySQL extension. This typically takes a few minutes. Subsequent starts reuse the cached image.
4

Verify the containers are running

Check that both containers started successfully:
docker compose ps
You should see both gymflow_php_server and gymflow_db_server listed with a running status.You can also confirm the API is reachable on port 8050:
curl http://localhost:8050/api
To open a shell inside the PHP container for running Symfony console commands:
docker exec -it gymflow_php_server bash

Stopping and removing containers

To stop the running containers without removing them:
docker compose stop
To stop and remove containers, networks, and the named volume:
docker compose down -v
The -v flag removes the gymflow_db_mysql named volume. Omit it if you want to preserve your database data between restarts.

Environment variables

Configure APP_SECRET, DATABASE_URL, JWT_PASSPHRASE, and other required variables.

Database setup

Run Doctrine migrations and load the initial seed data into MariaDB.

Authentication

How GymFlow issues and validates JWT tokens for all API requests.

Quickstart

End-to-end walkthrough from clone to logging your first workout.

Build docs developers (and LLMs) love