Skip to content

RadioStudent/picapica

Repository files navigation

picapica

pica pica

Web app for physical music library management.

Installation (docker)

To do the following steps, you need docker, docker-compose and npm (with Node) locally installed.

  1. clone git repo
  2. run docker-compose up
  3. waaaait for it
  4. install dependencies with composer ./composer.sh install
  5. copy assets ./console.sh assets:install
  6. Run latest migrations ./console.sh doctrine:migrations:migrate
  7. index the database with elasticsearch ./console.sh fos:elastica:populate This one is superlong, you can proceed with other steps while it's running. If there's a problem, rebuild the docker images; docker-compose down; docker-compose up --build
  8. install javascript dependencies npm i
  9. build js and css with npm run build
  10. the app is now accessible at localhost:8086
  11. login with fonoteka/fonoteka

The following helper scripts are available for your convenience:

  • ./composer.sh - runs composer CLI tool
  • ./console.sh - runs Symfony console helper
  • ./docker-permfix.sh - fixes potential permission issues (may need sudo)
  • npm run watch - run the watcher which reacts to changes in CSS/javascript source files

Installation (non-docker)

  1. You need nginx, php (fpm), mysql, nodejs with npm and elasticsearch
  2. clone git repo
  3. run "composer install"
  4. configure nginx with php-fpm to serve "web/app.php" (a generic symfony 2 configuration for nginx should work)
  5. prepare the database "php app/console doctrine:schema:create"
  6. copy assets "php app/console assets:install"
  7. (optionally) import the old database "php app/console picapica:import"
  8. add a user for yourself "php app/console fos:user:create"
  9. index the database with elasticsearch "php app/console fos:elastica:populate"
  10. install javascript dependencies "npm i"
  11. js and css can always be built with "npm run build"

Elasticsearch docker

Needs a high enough vm.max_map_count value:

sysctl -w vm.max_map_count=262144

You can permanently set it at /etc/sysctl.conf:

# Za elasticsearch docker
vm.max_map_count=262144