Skip to content

Commit

Permalink
Move devtools to separate recipe (#260)
Browse files Browse the repository at this point in the history
* Add start-azure recipe

* Move devtools to separate recipe
  • Loading branch information
c-w authored Nov 30, 2019
1 parent 0e1d49e commit 3cfd59a
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 37 deletions.
12 changes: 11 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,16 @@ in the integration tests folder and can be run via:
# finally, tear down the services
make stop
The state of the system can be inspected via:

.. sourcecode :: sh
# run the development tools and then
# view storage state at http://localhost:10001
# view database state at http://localhost:8882
# view queue state at http://localhost:5555
make start-devtools
Note that by default the application is run in a fully local mode, without
leveraging any cloud services. For most development purposes this is fine
but if you wish to set up the full end-to-end stack that leverages the
Expand Down Expand Up @@ -169,7 +179,7 @@ following command:

.. sourcecode :: sh
docker-compose -f docker-compose.yml -f docker-compose.secrets.yml up --build
make start-azure
---------------------
Production deployment
Expand Down
31 changes: 0 additions & 31 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,34 +130,3 @@ services:
image: mcr.microsoft.com/azure-storage/azurite:latest
ports:
- ${AZURITE_PORT}:10000

flower:
image: mher/flower:latest
depends_on:
- rabbitmq
command: ["--address=0.0.0.0", "--port=5555", "--broker=amqp://${RABBITMQ_USER}:${RABBITMQ_PASSWORD}@rabbitmq"]
ports:
- ${FLOWER_PORT}:5555

pgweb:
image: sosedoff/pgweb:latest
depends_on:
- postgres
command: ["/usr/bin/pgweb", "--bind=0.0.0.0", "--listen=8000", "--url=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable"]
ports:
- ${PGWEB_PORT}:8000

cloudbrowser:
image: cwolff/django-cloud-browser:latest
depends_on:
- azurite
environment:
CLOUD_BROWSER_DATASTORE: "ApacheLibcloud"
CLOUD_BROWSER_APACHE_LIBCLOUD_PROVIDER: "AZURE_BLOBS"
CLOUD_BROWSER_APACHE_LIBCLOUD_ACCOUNT: "${AZURITE_ACCOUNT}"
CLOUD_BROWSER_APACHE_LIBCLOUD_SECRET_KEY: "${AZURITE_KEY}"
CLOUD_BROWSER_APACHE_LIBCLOUD_HOST: "azurite"
CLOUD_BROWSER_APACHE_LIBCLOUD_PORT: "10000"
CLOUD_BROWSER_APACHE_LIBCLOUD_SECURE: "${AZURITE_SECURE}"
ports:
- ${CLOUDBROWSER_PORT}:8000
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ services:

secrets:
azure:
file: ./secrets/azure.env
file: ../secrets/azure.env
cloudflare:
file: ./secrets/cloudflare.env
file: ../secrets/cloudflare.env
users:
file: ./secrets/users.env
file: ../secrets/users.env
sendgrid:
file: ./secrets/sendgrid.env
file: ../secrets/sendgrid.env
34 changes: 34 additions & 0 deletions docker/docker-compose.tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: '3.4'

services:

flower:
image: mher/flower:latest
depends_on:
- rabbitmq
command: ["--address=0.0.0.0", "--port=5555", "--broker=amqp://${RABBITMQ_USER}:${RABBITMQ_PASSWORD}@rabbitmq"]
ports:
- ${FLOWER_PORT}:5555

pgweb:
image: sosedoff/pgweb:latest
depends_on:
- postgres
command: ["/usr/bin/pgweb", "--bind=0.0.0.0", "--listen=8000", "--url=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable"]
ports:
- ${PGWEB_PORT}:8000

cloudbrowser:
image: cwolff/django-cloud-browser:latest
depends_on:
- azurite
environment:
CLOUD_BROWSER_DATASTORE: "ApacheLibcloud"
CLOUD_BROWSER_APACHE_LIBCLOUD_PROVIDER: "AZURE_BLOBS"
CLOUD_BROWSER_APACHE_LIBCLOUD_ACCOUNT: "${AZURITE_ACCOUNT}"
CLOUD_BROWSER_APACHE_LIBCLOUD_SECRET_KEY: "${AZURITE_KEY}"
CLOUD_BROWSER_APACHE_LIBCLOUD_HOST: "azurite"
CLOUD_BROWSER_APACHE_LIBCLOUD_PORT: "10000"
CLOUD_BROWSER_APACHE_LIBCLOUD_SECURE: "${AZURITE_SECURE}"
ports:
- ${CLOUDBROWSER_PORT}:8000
8 changes: 7 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ build:
start:
docker-compose up -d --remove-orphans

start-azure:
docker-compose -f docker-compose.yml -f docker/docker-compose.secrets.yml up -d --remove-orphans

start-devtools:
docker-compose -f docker-compose.yml -f docker/docker-compose.tools.yml up -d --remove-orphans

logs:
if [ "$(ALL)" = "true" ]; then \
docker-compose ps --services | while read service; do \
Expand All @@ -81,7 +87,7 @@ logs:
fi

stop:
docker-compose down --volumes --timeout=5
docker-compose -f docker-compose.yml -f docker/docker-compose.tools.yml down --volumes --timeout=5

verify-build:
docker pull wagoodman/dive
Expand Down

0 comments on commit 3cfd59a

Please sign in to comment.