added volumes and scripts to automate it

This commit is contained in:
Divyansh Bhardwaj 2022-05-01 20:20:43 +05:30
parent a25bc68592
commit 28b8605b81
3 changed files with 26 additions and 9 deletions

View File

@ -69,11 +69,11 @@ RUN mv example ~/floscout
WORKDIR ../
WORKDIR ../
# setup of mongoose server
# RUN git clone https://github.com/cesanta/mongoose.git
# WORKDIR mongoose
# RUN simplest_web_server.c
# WORKDIR ../
setup of mongoose server
RUN git clone https://github.com/cesanta/mongoose.git
WORKDIR mongoose
RUN simplest_web_server.c
WORKDIR ../
# Supervisor configurations
## Flo token tracking configuration
@ -88,4 +88,7 @@ RUN mkdir /var/log/ranchimallflo-api/
RUN touch /var/log/ranchimallflo-api/ranchimallflo-api.err.log
RUN touch /var/log/ranchimallflo-api/ranchimallflo-api.out.log
COPY run.sh .
RUN chmod +x run.sh
CMD ["/etc/supervisor/conf.d/run.sh"]
# RUN supervisord -c /etc/supervisor/conf.d/ftt-ranchimallflo.conf

View File

@ -13,8 +13,21 @@ RanchiMall wants to made things easy for you by packing all the three systems to
## How do I use this?
Clone the repository and then run
Clone the repository and then crete a docker volume
```
docker volume inspect ranchimall-flo-volume
```
Build the docker image by the following command
```
sudo docker build .
```
```
Run the docker container with exposing all the port and mounting the volume
```
docker run -d -p 5009:5009 6200:6200 -v ranchimall-flo-volume 147fcf811419
```

5
run.sh
View File

@ -1,4 +1,5 @@
#!/bin/bash
cd /etc/supervisor/conf.d/
exec python3 /ftt-docker/tracktokens-smartcontracts.py &
exec python3 /ranchimallflo-api/hypercorn -w 1 -b 0.0.0.0:5009 wsgi:app
echo "running..."
supervisord -c /etc/supervisor/conf.d/ftt-ranchimallflo.conf