Skip to content
Han edited this page Mar 3, 2025 · 5 revisions

Daily updates

check https://github.com/tpximpact/bops and make sure main is in sync with bops repo

Update code and applicants submodule

git pull
git submodule update

Our setup notes for using BOP's

checkout repo

git clone git@github.com:unboxed/bops.git

setup submodules

cd bops-applicants

git submodule update --init --recursive

cd ..

build and run

docker compose build

docker compose up -d

open browser

http://southwark.bops.localhost:3000/

http://config.bops.localhost:3000/users/sign_in

make a global login

make console

PasswordGenerator.call

User.create(name: 'Al Powerful', local_authority: nil, otp_required_for_login: false role: "global_administrator", email: 'global_administrator@example.com', confirmed_at: Time.zone.now, password: '')

Enable Application Types

http://config.bops.localhost:3000/application_types#active

get API token when using the api docs

http://southwark.bops.localhost:3000/api/docs/index.html?urls.primaryName=API%20V2%20Docs

make console

ApiUser.all

apiUser = ApiUser.find(2)

apiUser.token

making applications

Run post on one of the examples on http://southwark.bops.localhost:3000/api/docs/index.html?urls.primaryName=API%20V2%20Docs

check LocalAuthorities exist

make console

LocalAuthority.all

add values for: app/models/local_authority.rb active_attributes

You can also set the maps key via .env file - its in 1password

email_reply_to_id (use SecureRandom.uuid)

reviewer_group_email

notify_api_key

Legislation

You'll need to create legislation via the global console to create applications

update all the southwark user passwords so we can login

make console

PasswordGenerator.call

User.all

user = User.find(5)

user.update(password: '', otp_required_for_login: false, confirmed_at: Time.zone.now)

TODO

  • better document changing the passwords for the southwark users which is the last section of the documentation here

Feedback

  • Legislation in the seed data

Known issues

Database not initialising

add RUN chmod -x /docker-entrypoint-initdb.d/10_postgis.sh after COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh in docker/postgis/Dockerfile