Install with Docker Compose
-
Create a
docker-compose.yml
file for the projectdocker-compose.yml services:biblioteca:image: ghcr.io/biblioverse/biblioteca:maincommand: ["/bin/sh", "-c" , "apache2-foreground" ]ports:- 8080depends_on:- dbstdin_open: truetty: truevolumes:- <cover_folder>:/var/www/html/public/covers- <books_folder>:/var/www/html/public/books- <image_cache_folder>:/var/www/html/public/media- .env:/var/www/html/.envdb:image: mariadb:11.7environment:- MYSQL_ROOT_PASSWORD=db- MYSQL_DATABASE=db- MYSQL_USER=db- MYSQL_PASSWORD=dbvolumes:- mariadb:/var/lib/mysqltypesense:image: typesense/typesense:27.1restart: on-failureports:- 8983- 8108volumes:- searchdata:/datacommand: '--data-dir /data --api-key=xyz --enable-cors'volumes:mariadb:searchdata:- Don’t forget to replace the database password and the typesense.
- Change the folders with the path you want to use to store the books on your machine.
-
Create a
.env.local
file with the following content:APP_SECRET=your_secretDATABASE_URL=mysql://db:db@db:3306/dbTYPESENSE_KEY=xyz -
Run the following command to start the project:
Terminal window docker-compose up -d -
Run the following commands to create the database and the admin user:
Terminal window docker compose exec biblioteca bin/console doctrine:migration:migrate --no-interactiondocker compose exec biblioteca bin/console app:create-admin-user [name] [password]docker compose exec biblioteca bin/console typesense:create -
Access the application at
http://localhost:8080
-
You can login with the name and password you set in step 4