forked from money-on-chain/price-feeder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (31 loc) · 1.64 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM python:3.9
# Autor
LABEL maintainer='[email protected]'
RUN apt-get update && \
apt-get install -y \
locales
RUN echo $TZ > /etc/timezone && \
apt-get update && apt-get install -y tzdata && \
rm /etc/localtime && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata && \
apt-get clean
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN brownie networks add RskNetwork rskTestnetPublic host=https://public-node.testnet.rsk.co chainid=31 explorer=https://blockscout.com/rsk/mainnet/api timeout=180
RUN brownie networks add RskNetwork rskTestnetPrivate host=http://moc-rsk-node-testnet.moneyonchain.com:4454 chainid=31 explorer=https://blockscout.com/rsk/mainnet/api timeout=180
RUN brownie networks add RskNetwork rskMainnetPublic host=https://public-node.rsk.co chainid=30 explorer=https://blockscout.com/rsk/mainnet/api timeout=180
RUN brownie networks add RskNetwork rskMainnetPrivate host=http://moc-rsk-node-mainnet.moneyonchain.com:4454 chainid=30 explorer=https://blockscout.com/rsk/mainnet/api timeout=180
RUN mkdir /home/www-data && mkdir /home/www-data/app \
&& mkdir /home/www-data/app/price_feeder
ARG CONFIG=config.json
WORKDIR /home/www-data/app/price_feeder/
COPY add_custom_network.sh ./
COPY app_run_price_feeder.py ./
ADD $CONFIG ./config.json
COPY config_parser.py ./
COPY price_feeder/ ./price_feeder/
ENV AWS_DEFAULT_REGION=us-west-1
ENV PATH "$PATH:/home/www-data/app/price_feeder/"
ENV PYTHONPATH "${PYTONPATH}:/home/www-data/app/price_feeder/"
CMD /bin/bash -c 'bash ./add_custom_network.sh; python ./app_run_price_feeder.py'