Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update xmlsec, pyenv and environment variables #80

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,21 @@ sudo apt-get install pkg-config
sudo apt install libxmlsec1 libxmlsec1-dev
```

#### pyenv (Optional)
The dependency of xmlsec library needs to be an older version, at least when
working with Homebrew. To install a working version:

```sh
brew uninstall libxmlsec1
brew install tvuotila/libxmlsec1/[email protected]
cd /opt/homebrew/opt/
ln -s libxmlsec1\@1.2.37 libxmlsec1
```

#### pyenv (Optional but recommended)

[pyenv](https://github.com/pyenv/pyenv) pyenv lets you easily switch between multiple versions of Python. It can be
[installed](https://github.com/pyenv/pyenv-installer) using the command `curl https://pyenv.run | bash`. You can then
install the version of Python you want to work with.
[installed](https://github.com/pyenv/pyenv-installer) using the command `curl https://pyenv.run | bash` or
`brew install pyenv`. You can then install the version of Python you want to work with.

Check if you already have pyenv-virtualenv as a plugin with your pyenv:

Expand All @@ -97,7 +107,8 @@ If you have it installed already you can skip the next part.

It is recommended that [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv) be used to allow `pyenv`
to manage _virtual environments_ in a manner that can be used by the [poetry](#poetry) tool. The `pyenv-virtualenv`
plugin can be installed by cloning the relevant repository into the `plugins` subdirectory of your `$PYENV_ROOT`:
plugin can be installed by `brew install pyenv-virtualenv` or cloning the relevant repository into the `plugins`
subdirectory of your `$PYENV_ROOT`:

```sh
mkdir -p $PYENV_ROOT/plugins
Expand Down Expand Up @@ -256,7 +267,8 @@ export SIMPLIFIED_ENABLE_BASIC_TOKEN_AUTH=true

#### Firebase Cloud Messaging

For Firebase Cloud Messaging (FCM) support (e.g., for notifications), `one` (and only one) of the following should be set:
For Firebase Cloud Messaging (FCM) support (e.g., for notifications), `one` (and only one) of the following should be
set:

- `SIMPLIFIED_FCM_CREDENTIALS_JSON` - the JSON-format Google Cloud Platform (GCP) service account key or
- `SIMPLIFIED_FCM_CREDENTIALS_FILE` - the name of the file containing that key.
Expand Down Expand Up @@ -353,6 +365,13 @@ Install only the production dependencies:
poetry install --only main,pg
```

Export required environment variables:

```sh
export PALACE_SEARCH_URL="http://localhost:9200/"
export SIMPLIFIED_PRODUCTION_DATABASE="postgresql://palace:test@localhost:5432/circ"
```

Run the application with:

```sh
Expand Down Expand Up @@ -416,7 +435,8 @@ At this point, we have a library named _Hazelnut Peak_ configured to use the _Pa
It's now necessary to tell the application to start importing books from the OPDS feed. When the application is
running inside a Docker image, the image is typically configured to execute various import operations on a regular
schedule using `cron`. Because we're running the application from the command-line for development purposes, we
need to execute these operations ourselves manually. In this particular case, we need to execute the `opds_import_monitor`:
need to execute these operations ourselves manually. In this particular case, we need to execute the
`opds_import_monitor`:

```sh
(circ) $ ./bin/opds_import_monitor
Expand Down Expand Up @@ -696,7 +716,7 @@ following environment variables:
- `SIMPLIFIED_TEST_DATABASE`
- `PALACE_TEST_SEARCH_URL`

Make sure the ports and usernames are updated to reflect the local configuration.
Make sure the ports and usernames are updated to reflect the local configuration, e.g.:

```sh
# Set environment variables
Expand Down
2 changes: 1 addition & 1 deletion core/resources/bisac.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4584,4 +4584,4 @@
"YAN056010","Young Adult NonFiction / Transportation / Aviation"
"YAN056020","Young Adult NonFiction / Transportation / Boats, Ships & Underwater Craft"
"YAN056030","Young Adult NonFiction / Transportation / Cars & Trucks"
"YAN057000","Young Adult NonFiction / Travel"
"YAN057000","Young Adult NonFiction / Travel"
Loading