Assumes Already Have Basics
This assumes you already have looked at the general concepts for getting started.
There are many ways to run Diffgram locally. For the sake of development the ability to have the hot reload is important. In theory you can do this through docker too, but for the sake of this example I will show the "raw" way of running it without docker.
The following services are required. Some tasks may not need all of these.
- Default Service (Backend)
- Walrus Service (Backend)
yarn run dev
Depending on your operating system, you can run all of these scripts.
- Use the install.py script to setup your env variables.
- Setup local dependencies, including the database
- Run all the services
- Install locally
- Install with docker
- Use a remote postgres instance
This is done automatically as part of install.py.
To manually construct the initial database, or update to the latest version run
The structure of the database is defined in code through SQL Alchemy classes.
The migration and history of the database uses Alembic.
This will start with
77907aedd319_diffgram_initial_db, and migrate through all revisions to present. This is a more durable approach then simply calling the SQL Alchemy classes directly.
Defaults already set
These are the defaults in both the services and the local_dispatch.
- Dispatcher 8085 http://127.0.0.1:8085/ is the main access point
- Default 8080
- Walrus 8082
- Frontend 8081
- Postgres 5432 Set as part of database url
- Python environments. Check the requirements.txt for each service. Suggest virtual env or conda
- Export or set PYTHON_PATH
cd replace_with_path_to_service conda create --name diffgram_walrus python=3 pip install -r requirements.txt
- Build. eg to get icons
Updated 9 months ago