-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
136 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
*.pyc | ||
htmlcov | ||
.coverage | ||
*/wheelhouse | ||
*.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: '2' | ||
services: | ||
rabbit: | ||
container_name: rabbit | ||
image: rabbitmq:3.6-management | ||
ports: | ||
# management plugin port, use RABBITMQ_DEFAULT_USER to log in | ||
- "15673:15672" | ||
# regular rabbit port, to enable access from the outside | ||
- "5673:5672" | ||
restart: always | ||
|
||
postgres: | ||
container_name: postgres | ||
image: postgres | ||
ports: | ||
- "5433:5432" | ||
environment: | ||
POSTGRES_PASSWORD: "password" | ||
POSTGRES_USER: "postgres" | ||
restart: always | ||
|
||
orders: | ||
container_name: orders | ||
image: nameko/nameko-example-orders:latest | ||
depends_on: | ||
- rabbit | ||
- postgres | ||
ports: | ||
- "8001:8000" | ||
links: | ||
- "rabbit:rabbit" | ||
- "postgres:postgres" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM debian:jessie | ||
|
||
RUN apt-get update && \ | ||
apt-get install -qyy \ | ||
-o APT::Install-Recommends=false -o APT::Install-Suggests=false \ | ||
python3 python-pip ca-certificates && \ | ||
cd /usr/local/bin && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
RUN pip install virtualenv | ||
|
||
RUN virtualenv -p python3 /appenv | ||
RUN . /appenv/bin/activate; pip install -U pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM nameko-example-base | ||
|
||
RUN apt-get update && \ | ||
apt-get install -qyy \ | ||
-o APT::Install-Recommends=false -o APT::Install-Suggests=false \ | ||
build-essential python3-dev libpq-dev python-psycopg2 && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
RUN . /appenv/bin/activate; \ | ||
pip install wheel | ||
|
||
|
||
ENV WHEELHOUSE=/wheelhouse | ||
ENV PIP_WHEEL_DIR=/wheelhouse | ||
ENV PIP_FIND_LINKS=/wheelhouse | ||
|
||
VOLUME /wheelhouse | ||
VOLUME /application | ||
|
||
CMD . /appenv/bin/activate; \ | ||
cd /application; \ | ||
pip wheel . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# docker | ||
|
||
run-wheel-builder: | ||
docker run --rm \ | ||
-v "$$(pwd)":/application -v "$$(pwd)"/wheelhouse:/wheelhouse \ | ||
nameko-example-builder; | ||
|
||
build-image: | ||
docker build -t nameko/nameko-example-orders:latest -f docker.run .; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
DB_URIS: | ||
"orders:Base": "postgresql://postgres:password@postgres/orders" | ||
|
||
AMQP_URI: "amqp://guest:guest@rabbit:5672/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM nameko-example-base | ||
|
||
ADD wheelhouse /var/nameko/wheelhouse | ||
|
||
WORKDIR /var/nameko/ | ||
|
||
COPY config.yml /var/nameko/config.yml | ||
|
||
RUN . /appenv/bin/activate; \ | ||
pip install --no-index -f wheelhouse nameko_examples_orders | ||
|
||
EXPOSE 8000 | ||
|
||
CMD . /appenv/bin/activate; \ | ||
nameko run --config config.yml service --backdoor 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters