Skip to content
/ pb Public

a DFK project to inventorize the items within the Palais Beauharnais

License

AGPL-3.0, Unknown licenses found

Licenses found

AGPL-3.0
LICENSE
Unknown
COPYING
Notifications You must be signed in to change notification settings

dfk-paris/pb

Repository files navigation

Palais Beauharnais Catalogue

A simple database to store metadata on the interior equipment within the Palais Beauharnais in Paris, France. This repository contains the source code for the web application. The application is currently available here.

License

The source code is licensed under AGPL-3.0, see COPYING and LICENSE. If you are interested in receiving a snapshot of the data as well, please contact the Deutsches Forum für Kunstgeschichte Paris.

Setup

To build and deploy the application nodejs and npm are required on a workstation. On the server, an environment to run rack applications is required as well as MySQL. We will assume that all three are already set up. Make sure the bundler gem is installed on the server as well.

For MySQL, make sure that ft_min_word_len ([mysqld] section) is set to 2 instead of the default of 4. This sets the minimum word length that can be found with the full text search. This value has to be set correctly BEFORE the database is created, or REPAIR TABLE main_entries QUICK has to be run afterwards.

Clone this repository, then change into its directory. Run the following to install dependencies via npm

npm install

Then build the js, styles and images

npm run build

For deployment, you will need to add a file deploy/config.sh and configure some environment variables specific to your deployment:

export REPO="."
export HOST="[email protected]"
export PORT="22"
export DEPLOY_TO="/path/to/app"
export BUNDLE_PATH="/path/to/bundle"
export COMMIT="master"
export KEEP=5

BUNDLE_PATH lets you configure a directory where dependencies should be installed to. If you remove it, the default will be used `(/path/to/app/shared/bundle).

On the server, create a directory /path/to/app/shared and configure the database adapter within shared/database.yml and the secrets file at config/secrets.yml. Then, run the deployment script on the workstation:

./deploy/app.sh

Then, on the serverinitialize the database within /path/to/app/current:

RAILS_ENV=production bundle exec rake db:setup

The app is ready to login with username admin and password admin.

Widget Integration

A page might integrate a widget that this software provides. The only widgets at the moment are the listing and the filtering form. To use any of them, add the following at the end of your html body:

<script
  type="text/javascript"
  src="https://pb.dfkg.org/app.js"
  pb-api-url="https://pb.dfkg.org"
></script>
<script type="text/javascript">riot.mount('pb-listing')</script>

Where the src and pb-api-url should point to the url where this application is hosted. Also configure the CORS parameters within config/application.rb so that your integrating page is allowed to fetch data from this app. Then you may simply add the widgets within your html body like this:

the filter form

<pb-filters></pb-filters>

the listing

<pb-listing></pb-listing>

Attributions

The following resources have been integrated in accordance with their respective original licensing

About

a DFK project to inventorize the items within the Palais Beauharnais

Topics

Resources

License

AGPL-3.0, Unknown licenses found

Licenses found

AGPL-3.0
LICENSE
Unknown
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published