-
-
Notifications
You must be signed in to change notification settings - Fork 7
Installation
Tip
See the Migration Guide if you are migrating from the Info Service v3 for a rapid start.
There are 3 ways to install Currencyinfo depending on your needs:
- Docker: This is the recommend and supported way for self-hosting Currencyinfo.
- From source: If you are developing Currencyinfo or need to run on a platform that isn't support by the official Docker Images.
- Development setup: Using docker image for development, see Contributing Guide for details.
Docker is the recommended way to run Currencyinfo.
Using this sample file as a reference create a config.jsonc
file to contain configuration for your app.
It is recommended to use Docker Compose to manage the various docker containers, if your MongoDB is running in the cloud then you may skip this step and run the single Currencyinfo docker container directly.
- Install Docker Compose
- Optionally, you can create
docker-compose.override.yml
file to set custom port or restart policy:
services:
app:
restart: no
ports:
- '8080:8080'
Make sure you are in the same directory as docker-compose.yml
and build Currencyinfo with the following command:
docker compose -f docker-compose.prod.yaml build
Once the image is built, you can start Currencyinfo:
docker compose -f docker-compose.prod.yaml up
Note
If you have an override file for additional production settings, add -f docker-compose.override.yaml
after -f docker-compose.prod.yaml
.
If you would like to build on a platform that is not officially supported then from source is the way to go.
Install the following dependencies:
Clone the source code with the following command or download directly from GitHub:
git clone https://github.com/Adamant-im/currencyinfo.git
Using this sample file as a reference create a config.jsonc
file to contain configuration for your app:
cp config.default.jsonc config.jsonc
Add the configuration variables to your config file for your port, MongoDB database host, e.g.:
{
// ...
"server": {
"port": 36661,
"mongodb": {
"port": 27017,
"host": "127.0.0.1"
}
},
// ...
}
Install the required application dependencies:
pnpm install
Compile the application:
pnpm run build
You’re ready to start the app:
pnpm run start:prod
Check the output carefully for errors such as connecting to your database.