Changes for fixing Docker-Compose

Development uses localhost db
Instead of creating a separate network, just use the link parameter
This commit is contained in:
Patrick McDonagh
2017-05-03 13:10:41 -05:00
parent d5ff30356a
commit 0e58c84c6a
4 changed files with 21 additions and 25 deletions

View File

@@ -1,11 +1,5 @@
FROM python:latest
# RUN apt-get update && apt-get install -y nginx python3 python3-pip python python-pip supervisor
# COPY poc.conf /etc/nginx/sites-available/poc.conf
# RUN rm /etc/nginx/sites-enabled/default && ln -s /etc/nginx/sites-available/poc.conf /etc/nginx/sites-enabled/ && sleep 2 && service nginx start
COPY pocwww /root/www/pocwww
COPY setup.py /root/www/setup.py
COPY README.txt /root/www/README.txt
@@ -18,7 +12,7 @@ RUN /root/www/generate_cert.sh
RUN pip3 install /root/www/
COPY production.ini /root/www/production.ini
COPY development.ini /root/www/development.ini
# COPY development.ini /root/www/development.ini
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

View File

@@ -18,7 +18,7 @@ pyramid.includes =
# '127.0.0.1' and '::1'.
# debugtoolbar.hosts = 127.0.0.1 ::1
mongo_uri = mongodb://poc_www:HenryPump1903@172.17.0.2:27017/poc
mongo_uri = mongodb://poc_www:HenryPump1903@localhost:27017/poc
###

View File

@@ -1,28 +1,30 @@
version : '2'
services:
mongo:
image: patrickjmcd/mongodb-server
image: docker.henrypump.cloud/poc/mongodb-server
ports:
- "27017:27017"
networks:
poc:
ipv4_address: 10.10.10.10
# networks:
# poc:
# ipv4_address: 10.10.10.10
www:
image: patrickjmcd/poc-java-www
image: docker.henrypump.cloud/poc/poc-java-www
ports:
- "8080:6543"
networks:
- poc
# networks:
# - poc
depends_on:
- mongo
links:
- mongo:mongodb
networks:
poc:
driver: bridge
driver_opts:
com.docker.network.enable_ipv4: "true"
ipam:
driver: default
config:
- subnet: 10.10.10.0/24
# networks:
# poc:
# driver: bridge
# driver_opts:
# com.docker.network.enable_ipv4: "true"
# ipam:
# driver: default
# config:
# - subnet: 10.10.10.0/24

View File

@@ -10,7 +10,7 @@ pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
mongo_uri = mongodb://poc_www:HenryPump1903@10.10.10.10:27017/poc
mongo_uri = mongodb://poc_www:HenryPump1903@mongodb:27017/poc
#---------- Pipeline Configuration ----------