Home - RajeshArunachalam/Demosikulix-practive GitHub Wiki

Waterlabs corebackend production Environment

**Environment Detials **

vm : 10.1.210.25

username : vm01

Waterlabs corebackend Location : /backend-deployables

**Create .Env file under waterlabsCore folder with below details : **

NAME=productiondb PASSWORD=password DB_USERNAME="proddb" HOST="10.1.210.13" PORT="5432" MEDIA_PATH_URL="WaterlabsCoreBackend/media"

Create .Env file under waterlabs folder with below details :

WAYSTAR_CLAIMS_ARCHIVAL_ID="c54eeb88-4523-491e-aae2-e62f11e87acc" EUCLID_URL_PROCESS_ONE_ID="puttheidhere" EUCLID_URL_PROCESS_TWO_ID="puttheidhere" EUCLID_URL_PROCESS_THREE_ID="cac65038-8281-45d5-8cb9-89fb7cfca181" XIFIN_EV="869f735e-3354-4ffa-ab0d-4b9bf2168d7c" IP_ADDRESS="http://127.0.0.1:8000"

Docker file :

FROM python:3.8

RUN mkdir /WaterlabsCoreBackend

WORKDIR /WaterlabsCoreBackend

COPY requirements.txt /WaterlabsCoreBackend

COPY . /WaterlabsCoreBackend

RUN pip install -r requirements.txt

RUN python manage.py makemigrations

RUN python manage.py migrate

RUN mkdir staticfiles

RUN python manage.py runserver 0.0.0.0:8002 &

RUN python manage.py collectstatic

RUN ["chmod", "+x", "./celery-run.sh"]

CMD ./celery-run.sh

Docker Commands

cd /backend-deployables

docker stop rabbitmq

docker rm rabbitmq

docker stop waterlabscorebackend

docker rm waterlabscorebackend

docker run -p 15672:15672 -p 5672:5672 -d --name rabbitmq rabbitmq:3-management &

docker build . -t waterlabsbackend

docker run --net=host -v /opt/servers/Waterlabs_backend:/opt/servers/Waterlabs_backend -d --name waterlabscorebackend waterlabsbackend:latest &