moonstream/backend
kompotkot 364775dc94 Version, deployment service, setup requirements update for moonworm 2021-12-16 21:32:17 +00:00
..
configs Fix view filters. 2021-12-06 16:38:08 +02:00
deploy Moonstream api backend workd via nginx with localhost and proxy headers 2021-12-14 15:45:20 +00:00
moonstreamapi Version, deployment service, setup requirements update for moonworm 2021-12-16 21:32:17 +00:00
scripts EthereumTransaction pydantic model now true representation 2021-07-29 00:05:57 -07:00
.dockerignore Flag for db name in env generation script 2021-12-01 12:38:14 +00:00
.gitignore Updated gitignore and added dockerignore 2021-11-30 14:21:08 +00:00
.isort.cfg Version file for client and isort 2021-11-24 09:42:59 +00:00
Dockerfile Wait script for docker compose 2021-12-02 11:49:09 +00:00
README.md Docker moonstreamapi README setup workflow 2021-11-29 13:12:18 +00:00
dev.sh Docker and docker compose setup for db and moonstream api 2021-11-30 14:29:10 +00:00
mypy.ini Added mypy.ini to Moonstream backend 2021-07-28 10:24:12 -07:00
setup.py Specified version of bugout at setup.py 2021-12-13 17:30:57 +00:00

README.md

moonstream backend

Installation and setup

To set up Moonstream API for development, do the following:

Run server with Docker

To be able to run Moonstream API with your existing local or development services as database, you need to build your own setup. Be aware! The files with environment variables docker.dev.env lives inside your docker container!

  • Copy configs/sample.env to configs/docker.dev.env, or use your local configs from configs/dev.env to configs/docker.dev.env
  • Edit in docker.dev.env file MOONSTREAM_DB_URI and other variables if required
  • Clean environment file from export prefix and quotation marks to be able to use it with Docker
sed --in-place 's|^export * ||' configs/docker.dev.env
sed --in-place 's|"||g' configs/docker.dev.env

Build container on your machine

docker build -t moonstreamapi-dev .

Run moonstreamapi-dev container, with following command we specified --network="host" setting which allows to Docker container use localhost interface of your machine (https://docs.docker.com/network/host/)

docker run --name moonstreamapi-dev \
  --network="host" \
  --env-file="configs/docker.dev.env" \
  -p 7481:7481/tcp \
  -ti -d moonstreamapi-dev

Attach to container to see logs

docker container attach moonstreamapi-dev