Skip to content

Novactive/MN-gobelins-laravel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gobelins

Gobelins is the main back-end application for the Gobelins project, an initiative to make accessible the collections of the Mobilier National, as described here.

Documentation: coming soon :)

Development setup

First get the source by executing the command which will clone the repository :

composer create-project entrepreneur-interet-general/gobelins gobelins "dev-master" --repository='{"type": "vcs", "url": "git@github.com:Novactive/MN-gobelins-laravel.git"}' 

Download the following DB dump and save it as provisioning/dev/db/mn.lab.database.dump directory : https://docs.google.com/uc?export=download&id=1sh233rN-12w5glQPcdoqGjQM8piaVKXJ

Run the following command to create the local development docker stack :

make create

Once done, the application should be accessible from the following urls :

Importing products from the Gobelin-datasource API

php artisan gobelins:import -vvv

Interrupt process with Ctrl-C, it will gracefully exit. You may then resume the import starting from a given page:

php artisan gobelins:import -vvv --from=58

Re-indexing Elasticsearch:

php artisan scout:flush "App\Models\Product"
php artisan scout:import "App\Models\Product"

Deployment Scripts

The scripts folder contains the following deployment scripts, which are executed automatically by Jenkins during deployment:

  • pre-deploy.sh: This script is executed before deployment to prepare the environment. You can specify commands to run before deployment in this file. If no commands are needed, leave the file empty.
  • post-deploy.sh: This script is executed after deployment to finalize setup or perform post-deployment tasks. You can specify commands to run after deployment in this file. If no commands are needed, leave the file empty.

Usage in Jenkins

Jenkins will automatically execute these scripts during the deployment pipeline. Ensure that the scripts are properly configured and executable.

Cache stategy

Image caching

The images should hardely ever change, so we set up a request cache at the HTTP server level, so we only need to generate images once. Nginx will cache whatever result is outputted from the Image controller. For more configuration information, see the gobelins-devops repository.

Response cache

…TODO…

Credits

  • Laurie Chapotte, design
  • Ned Baldessin, development

License

The Gobelins application is open-sourced software licensed under the MIT license.

Copyright © 2018 Ministère de la Culture et de la Communication Mobilier national et manufactures des Gobelins, de Beauvais et de la Savonnerie.

About

Open access website for the Mobilier National collection

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 40.0%
  • JavaScript 23.5%
  • HTML 18.9%
  • Blade 16.7%
  • Shell 0.7%
  • Dockerfile 0.1%
  • Makefile 0.1%