FROM ubuntu:16.04
# Set the working directory to /app
-WORKDIR /app/osm_lcm
-
-# Copy the current directory contents into the container at /app
-ADD . /app # TODO move to the end
+WORKDIR /app/LCM/osm_lcm
RUN apt-get update && apt-get install -y git tox python3 \
python3-pip python3-aiohttp \
&& pip3 install pip==9.0.3 \
&& pip3 install -U 'PyYAML==3.*' 'aiohttp==0.20.2' flake8
-RUN git clone https://osm.etsi.org/gerrit/osm/N2VC.git \
- && pip3 install -e N2VC \
- && pip3 install -e N2VC/modules/libjuju \
+RUN git -C /app clone https://osm.etsi.org/gerrit/osm/N2VC.git \
+ && pip3 install -e /app/N2VC \
+ && pip3 install -e /app/N2VC/modules/libjuju \
&& apt-get install -y libffi-dev libssl-dev openssh-client
# cd N2VC; python3 setup.py develop
# cd modules/libjuju; python3 setup.py develop
-RUN git clone https://osm.etsi.org/gerrit/osm/common.git \
- && pip3 install -e common
+RUN git -C /app clone https://osm.etsi.org/gerrit/osm/common.git \
+ && pip3 install -e /app/common
# python3-pymongo python3-yaml pycrypto aiokafka
RUN mkdir -p /app/storage/kafka && mkdir -p /app/log
# database
ENV OSMLCM_DATABASE_DRIVER mongo
-ENV OSMLCM_DATABASE_HOST mongo
-ENV OSMLCM_DATABASE_PORT 27017
+ENV OSMLCM_DATABASE_URI mongodb://mongo:27017
+# ENV OSMLCM_DATABASE_COMMONKEY xxx
# ENV OSMLCM_DATABASE_USER xxx
# ENV OSMLCM_DATABASE_PASSWORD xxx
-# ENV OSMLCM_DATABASE_COMMONKEY xxx
#storage
ENV OSMLCM_STORAGE_DRIVER local
ENV OSMLCM_MESSAGE_PORT 9092
# logs
-ENV OSMLCM_GLOBAL_LOGFILE /app/log/lcm.log
+# ENV OSMLCM_GLOBAL_LOGFILE /app/log/lcm.log
ENV OSMLCM_GLOBAL_LOGLEVEL DEBUG
-# ADD . /app
+# Copy the current directory contents into the container at /app/LCM
+ADD . /app/LCM
# Run app.py when the container launches
CMD ["python3", "lcm.py"]
# HEALTHCHECK --interval=30 --timeout=140 --retries=1 \
-# CMD python3 /usr/lib/python3/dist-packages/osm_lcm/lcm.py --health-check || exit 1
-
+# CMD python3 lcm.py --health-check || exit 1