- This project uses rebases instead of merges. It is important to make sure you are following the correct git flow to keep the branches consistent.
- Playbook article here describing how to rebase for this project
- Pull down the code:
https://github.com/notch8/archivesspace - If its the first time you are working on this project,
cdinto the project and runcp docker-compose-dev-full.yml docker-compose.yml - To run the project:
docker compose up app - You will need to migrate the database to see the app run:
docker-compose exec app ./build/run db:migrate - Open ports 3001 for
public, 3000 forfrontendand 4567 forbackend - To sign into the staff interface username and password are both: admin
See https://archivesspace.github.io/tech-docs/development/dev.html for additional info
- Make sure the services section of
docker-compose.ymllooks like this (the "command" needs to be uncommented):
services:
app:
build:
context: .
dockerfile: Dev.dockerfile
command: bash -l -c "tail -f /dev/null"
depends_on:
- db
- solr
- db-test
- solr-test
env_file:
- .env.docker.dev
volumes:
- .:/archivesspace
- build:/archivesspace/build
- ./build/build.xml:/archivesspace/build/build.xml
ports:
- 3000:3000
- 3001:3001
- 4567:4567
- start the containers:
docker-compose up app - bash into the container:
docker-compose exec app bash - if you need to bundle the frontend (staff interface):
./build/run bundle:frontend - if you need to bundle the public interface:
./build/run bundle:public - if you need to update an individual gem in the public interface:
./build/run bundle:public:update -Donly-gem=GEM-NAME-HERE
- new tab- bash into the container:
docker-compose exec app bash - run the individual command to start the back end:
./build/run backend:devserver - new tab- bash into the container again:
docker-compose exec app bash - run the individual command to start the front end only:
./build/run frontend:devserver
- Copy the demo db into the db docker container:
docker cp build/mysql_db_fixtures/demo.sql.gz archivesspace_db_1:/ordocker cp build/mysql_db_fixtures/demo.sql.gz archivesspace-db-1:/depending on the name of your docker container
- run
docker psto see the name of your db container
- bash into the container for db:
docker-compose exec db sh - Unzip sql file: `gzip demo.sql.gz``
- import the database:
mysql -p archivesspace < demo.sql, password is 123456
- Bash into the container:
docker compose exec app bash - Unset frontend proxy URL:
unset APPCONFIG_FRONTEND_PROXY_URL
- you will need to run this each time you open a new terminal/shell, and are running frontend and Selenium specs
- Frontend:
./build/run frontend:testor./build/run frontend:selenium - Public:
./build/run public:test - Indexer:
./build/run indexer:test - Backend:
./build/run backend:test
- Run a single test file (you will replace the path at the end of the file or the command as needed).
- Examples:
./build/run frontend:test -Dpattern=features/repositories_spec.rb
- Examples: