Real Time Monitoring Information Systems
- Docker > v19
- Docker Compose > v2.1
- Docker Sync 0.7.1
Expected that PORT 5432 and 3000 are not being used by other services.
.env
DB_HOST=db
DB_PASSWORD=password
DB_SCHEMA=rtmis
DB_USER=akvo
DEBUG="True"
DJANGO_SECRET=local-secret
GOOGLE_APPLICATION_CREDENTIALS
MAILJET_APIKEY
MAILJET_SECRET
WEBDOMAIN
POSTGRES_PASSWORD=password
[email protected]
PGADMIN_DEFAULT_PASSWORD=password
PGADMIN_LISTEN_PORT="5050"
IP_ADDRESS="http://<your_ip_address>:3000/api/v1/device"
APK_UPLOAD_SECRET="123456789AU"
STORAGE_PATH="./storage"
SENTRY_DSN="<<your sentry DSN for BACKEND>>"
SENTRY_MOBILE_ENV="<<your sentry env>>"
SENTRY_MOBILE_DSN="<<your_sentry_mobile_DSN>>"
SENTRY_MOBILE_AUTH_TOKEN="<<your_sentry_mobile_auth_token>>"
You can generate a Sentry auth token by following this official Sentry documentation.
For initial run, you need to create a new docker volume.
./dc.sh up -d
docker volume create rtmis-docker-sync
Note: On some linux systems, you may need to change the permissions of the directory where the volume is stored.
The development site should be running at: localhost:3000. Any endpoints with prefix
^/api/*
is redirected to localhost:8000/api^/static-files/*
is for worker service in localhost:8000
Network Config:
- setupProxy.js
- mainnetwork container setup
Add New User and Seed Master Data:
Once the containers are up and running, you can seed the necessary data by running the following command:
./dc.sh exec backend ./seeder.sh
The script will prompt you for various actions related to data seeding such as:
- seed administrative data
- add a new super admin
- seed fake users
- seed forms
- and seed fake data
Answer each prompt by entering 'y' or 'n' followed by the Enter key.
./dc.sh exec backend python manage.py generate_views
This command will generate materialized view for DataCategory
model
./dc.sh log --follow <container_name>
Available containers:
- backend
- frontend
- mainnetwork
- db
- pgadmin
./dc.sh stop
./dc.sh down -t1
docker volume rm rtmis-docker-sync
For initial run, you need to create a separate docker volume.
docker volume create rtmis-mobile-docker-sync
./dc-mobile.sh up -d
- Install the Expo Go app from Playstore
- Connect your android to the same wireless network as your machine.
- Open The Expo Go
- Enter URL Manually:
Your_IP_Address:19000
./dc-mobile.sh down -t1
export CI_COMMIT='local'
./ci/build.sh
Above command will generate two docker images with prefix eu.gcr.io/akvo-lumen/rtmis
for backend and frontend
docker-compose -f docker-compose.yml -f docker-compose.ci.yml up -d
Network config: nginx