- Docker development setup
- Bash into the container
- Deploy a new release
- Clear data records
- Run import from admin page
We recommend committing .env to your repo with good defaults. .env.development, .env.production etc can be used for local overrides and should not be in the repo.
-
Make sure Docker.app is installed and running
-
If you don't already have it, install stack car
gem install stack_car
-
If you don't already have it, install and enable dory
gem install dory
-
After cloning the repo and
cd
ing into its directory, install dependenciessc build
-
Start dory
dory up
-
Start the server
sc up
-
Load the database
sc be rake db:migrate
-
Import data into the database. The
[100]
limits the number of records to 100. If you want to load more items, increase the number. If you wish to load all items, remove the brackets entirely. If you want to import a specific set, you can pass the set in as the second argument. The default set is 'arce_1', which imports all of the collections.sc exec bash # to enter bash rake import[100] exit # to exit bash
To import 100 of the Tomb of Menna collection:
sc exec bash # to enter bash rake import[100,'tom_1'] exit # to exit bash
-
Then visit http://arce.docker in your browser
-
If you need a user or need to be an admin, load the seed data
sc be rake db:seed
-
When done, stop the app and services:
- Press
ctrl + c
in the window wheresc up
is running - When that's done,
sc stop
shuts down the running containers dory down
stops Dory
- Press
Confirm or configure settings. Sub your information for the examples.
git config --global user.name example
git config --global user.email [email protected]
docker login registry.gitlab.com
If the app is properly installed and you imported works from step 8, you should be able to view a work's UV at its show page. If the work show page loads all of the work's metadata but does not show the UV, you may have to do the following:
- Stop the app and services
- Run
yarn install
. This is supposed to run duringsc build
, but it may not have properly installed the UV - If you get
...node_modules/node-sass: Command failed. Exit code: 1 Command: node scripts/build.js
, proceed to the next step - Delete your project's
node_module
folder andyarn.lock
file - Re-run
yarn install
. This will automatically create a newnode_module
folder andyarn.lock
file - Restart your app and attempt to view a work's show page. The UV should now work
sc exec bash
- Run rspec
bundle exec rspec
- Access the rails console
bundle exec rails c
exit
sc release {staging | production} # creates and pushes the correct tags
sc deploy {staging | production} # deploys those tags to the server
Release and Deployment are handled by the gitlab ci by default. See ops/deploy-app to deploy from locally, but note all Rancher install pull the currently tagged registry image
sc be rake clear
Login to admin page using seed user info Press the import records button
Release and Deployment are handled by the gitlab ci by default. See ops/deploy-app to deploy from locally, but note all Rancher install pull the currently tagged registry image