Updates docker files
This commit is contained in:
14
daq/Dockerfile
Normal file
14
daq/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM python:latest
|
||||
|
||||
# Copy source files
|
||||
RUN mkdir /root/tag-logger
|
||||
COPY taglogger.py /root/tag-logger/taglogger.py
|
||||
COPY pycomm-master /tmp/pycomm
|
||||
COPY Pycomm-Helper /tmp/pycomm_helper
|
||||
|
||||
# Install some python packages
|
||||
RUN pip install requests
|
||||
RUN cd /tmp/pycomm && python setup.py install && cd /
|
||||
RUN cd /tmp/pycomm_helper && python setup.py install && cd /
|
||||
|
||||
CMD ["python", "/root/tag-logger/taglogger.py"]
|
||||
Submodule daq/pycomm_helper deleted from a3b6c088c5
@@ -14,7 +14,7 @@ import requests
|
||||
from pycomm_helper.tag import Tag
|
||||
|
||||
# DEFAULTS
|
||||
db_address = "10.10.10.10:3000"
|
||||
db_address = "web_db:3000"
|
||||
db_url = "https://{}".format(db_address)
|
||||
scan_rate = 30 # seconds
|
||||
save_all = "test" # use True, False, or any string
|
||||
|
||||
@@ -1,26 +1,23 @@
|
||||
version : '2'
|
||||
services:
|
||||
web_db:
|
||||
image: henrypump/logger/web_db
|
||||
image: docker.henrypump.cloud/datalogger/web_db
|
||||
ports:
|
||||
- "443:5000"
|
||||
networks:
|
||||
poconsole:
|
||||
ipv4_address: 10.10.10.10
|
||||
daq_sample:
|
||||
image: henrypump/logger/daq_sample
|
||||
networks:
|
||||
- poconsole
|
||||
daq:
|
||||
image: docker.henrypump.cloud/datalogger/daq
|
||||
depends_on:
|
||||
- web_db
|
||||
links:
|
||||
- web_db
|
||||
|
||||
|
||||
networks:
|
||||
poconsole:
|
||||
driver: bridge
|
||||
driver_opts:
|
||||
com.docker.network.enable_ipv4: "true"
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 10.10.10.0/24
|
||||
# networks:
|
||||
# poconsole:
|
||||
# driver: bridge
|
||||
# driver_opts:
|
||||
# com.docker.network.enable_ipv4: "true"
|
||||
# ipam:
|
||||
# driver: default
|
||||
# config:
|
||||
# - subnet: 10.10.10.0/24
|
||||
|
||||
23
web_db/Dockerfile
Normal file
23
web_db/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM python:latest
|
||||
|
||||
RUN apt-get -y update
|
||||
COPY mysql-install.sh /tmp/mysql-install.sh
|
||||
RUN chmod +x /tmp/mysql-install.sh && /tmp/mysql-install.sh
|
||||
|
||||
RUN mkdir /root/tag-logger
|
||||
COPY flask /root/tag-logger/flask
|
||||
|
||||
COPY mysql-connector-python-2.1.4 /tmp/mysql
|
||||
RUN cd /tmp/mysql && python setup.py install && cd ~
|
||||
|
||||
COPY startup.sh /root/startup.sh
|
||||
RUN chmod +x /root/startup.sh
|
||||
|
||||
RUN pip install flask flask-restless flask-sqlalchemy pyopenssl
|
||||
|
||||
RUN apt-get clean
|
||||
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN service mysql restart && python /root/tag-logger/flask/setupdb.py
|
||||
|
||||
CMD '/root/startup.sh'
|
||||
Reference in New Issue
Block a user