Parrot is a self-hosted Localization Management Platform, this document describes how to deploy it and how to interact with the API layer.
Installation / Deployment
NOTICE: the project is still in heavy development and it is NOT recommended for use in production until a version 1.0 is reached.
Start out by cloning this repo:
$ git clone https://github.com/parrot-translate/parrot.git $ cd parrot
Make sure you have Postgres running, by default Parrot's API server will look for it on
postgres://localhost:5432 and will try to connect to a database named
parrot. You can configure this using the AppConfig, see the configuration section below for more info.
To start a pre-configured Postgres instance on docker, simply run:
Now apply the database migrations. Using Alembic it's really simple:
$ cd migrations $ alembic upgrade head
Once again, if you wish to configure the DB parameters, you need to override the default values. For Alembic you just need to go to the
migrations/alembic.ini file and modify the
Finally you can build Parrot from source:
# From the root dir 'parrot' $ ./build/build-all.sh
Now we simply need start the API and serve the web app files.
Navigate to http://localhost:9990/api/v1/ping and you should be able to see if the API is up.
And on a separate terminal session, let's start a convinient Python HTTP server to serve the static web app files locally:
And to view the web app simply navigate to http://localhost:8080, it should open the login page of the web app.
At the moment, configuring the API app is only possible via environment variables. Here's the available options with their default values:
PARROT_API_PORT, default value: "9990" PARROT_DB_NAME, default value: "postgres" PARROT_DB_CONN, default value: "postgres://[email protected]:5432/parrot?sslmode=disable" PARROT_AUTH_ISSUER, default value: "[email protected]" PARROT_AUTH_SIGNING_KEY, default value: "secret"
You can also configure the Web App's backend endpoint by editing the file
parrot/web-app/src/environments/environment.prod.ts accordingly before building the Web app. Available options:
apiEndpoint, default value: "http://localhost:9990/api/v1"