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 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 pocwww /root/www/pocwww
COPY setup.py /root/www/setup.py COPY setup.py /root/www/setup.py
COPY README.txt /root/www/README.txt COPY README.txt /root/www/README.txt
@@ -18,7 +12,7 @@ RUN /root/www/generate_cert.sh
RUN pip3 install /root/www/ RUN pip3 install /root/www/
COPY production.ini /root/www/production.ini 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 apt-get clean
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

View File

@@ -18,7 +18,7 @@ pyramid.includes =
# '127.0.0.1' and '::1'. # '127.0.0.1' and '::1'.
# debugtoolbar.hosts = 127.0.0.1 ::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' version : '2'
services: services:
mongo: mongo:
image: patrickjmcd/mongodb-server image: docker.henrypump.cloud/poc/mongodb-server
ports: ports:
- "27017:27017" - "27017:27017"
networks: # networks:
poc: # poc:
ipv4_address: 10.10.10.10 # ipv4_address: 10.10.10.10
www: www:
image: patrickjmcd/poc-java-www image: docker.henrypump.cloud/poc/poc-java-www
ports: ports:
- "8080:6543" - "8080:6543"
networks: # networks:
- poc # - poc
depends_on: depends_on:
- mongo - mongo
links:
- mongo:mongodb
networks: # networks:
poc: # poc:
driver: bridge # driver: bridge
driver_opts: # driver_opts:
com.docker.network.enable_ipv4: "true" # com.docker.network.enable_ipv4: "true"
ipam: # ipam:
driver: default # driver: default
config: # config:
- subnet: 10.10.10.0/24 # - subnet: 10.10.10.0/24

View File

@@ -10,7 +10,7 @@ pyramid.debug_authorization = false
pyramid.debug_notfound = false pyramid.debug_notfound = false
pyramid.debug_routematch = false pyramid.debug_routematch = false
pyramid.default_locale_name = en 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 ---------- #---------- Pipeline Configuration ----------