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 Docker-installation.md #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
18 changes: 10 additions & 8 deletions docs/Docker-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Docker Compose is created with redis , worker , postgis database , api and fron
nvidia-smi
```

4. Clonse Base Model and Create RAMP_HOME
4. Clone Base Model and Create RAMP_HOME

- Create a new folder called RAMP , outside fAIr

Expand Down Expand Up @@ -72,7 +72,8 @@ Docker Compose is created with redis , worker , postgis database , api and fron
- Check permissions for ```Read user preferences``` and Redirect URI to be ```http://127.0.0.1:3000/authenticate/``` , Give it name as ```fAIr Dev Local```
- You will get ```OSM_CLIENT_ID``` , ```OSM_CLIENT_SECRET``` Copy them

6. Create Env variables
6. Create Env variables
Backend
- Create a file ```.env``` in backend with [docker_sample_env](../backend/docker_sample_env) content
```
cd backend
Expand All @@ -82,14 +83,15 @@ Docker Compose is created with redis , worker , postgis database , api and fron

Leave rest of the items as it is unless you know what you are doing

- Create ```.env``` in /frontend
Frontend
- Create ```.env``` file in /frontend
```
cd frontend
cp .env_sample .env
```
You can leave it as it is for dev setup

7. Build & Run containers

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shure its 8 ?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8. Build & Run containers

```
docker compose build
Expand All @@ -99,7 +101,7 @@ Docker Compose is created with redis , worker , postgis database , api and fron
docker compose up
```

8. Run Migrations
9. Run Migrations

Run directly bash script :

Expand All @@ -121,7 +123,7 @@ Docker Compose is created with redis , worker , postgis database , api and fron
python manage.py makemigrations core
python manage.py migrate

9. Play and Develop
10. Play and Develop

Restart containers

Expand All @@ -133,7 +135,7 @@ Docker Compose is created with redis , worker , postgis database , api and fron

Please open the frontend using URL `127.0.0.1:3000` instead of `localhost:3000` to ensure login functionality.

10. Want to run your local tiles ?
11. Want to run your local tiles ?

You can use [titler](https://github.com/developmentseed/titiler) , [gdals2tiles](https://gdal.org/programs/gdal2tiles.html) or nginx to run your own TMS server and add following to docker compose in order to access your localhost through docker containers . Add those to API and Worker . Make sure you update the .env variable accordingly

Expand Down Expand Up @@ -185,4 +187,4 @@ Docker Compose is created with redis , worker , postgis database , api and fron
DATABASE_URL=postgis://postgres:admin@localhost:5434/ai
CELERY_BROKER_URL="redis://localhost:6379/0"
CELERY_RESULT_BACKEND="redis://localhost:6379/0"
```
```