Skip to content

Commit

Permalink
Move flower from production to devtool (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-w authored Nov 25, 2019
1 parent c224482 commit 7c30ed9
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 88 deletions.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ POSTGRES_DB=telemetry

APPINSIGHTS_PORT=8888
APPINSIGHTS_INSTRUMENTATIONKEY=a314c6f7-776c-4e82-a677-8a3ecfb4669f

FLOWER_PORT=5555
RABBITMQ_USER=ascoderu
RABBITMQ_PASSWORD=123456
23 changes: 12 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.4'

x-shared-app-environment:
&shared-app-environment
LOKOLE_QUEUE_BROKER_URL: amqp://guest:guest@rabbitmq
LOKOLE_QUEUE_BROKER_URL: amqp://${RABBITMQ_USER}:${RABBITMQ_PASSWORD}@rabbitmq
LOKOLE_QUEUE_BROKER_SCHEME: ${LOKOLE_QUEUE_BROKER_SCHEME}
LOKOLE_EMAIL_SERVER_QUEUES_SAS_NAME: ${LOKOLE_EMAIL_SERVER_QUEUES_SAS_NAME}
LOKOLE_EMAIL_SERVER_QUEUES_SAS_KEY: ${LOKOLE_EMAIL_SERVER_QUEUES_SAS_KEY}
Expand Down Expand Up @@ -49,15 +49,13 @@ services:
- ${APP_PORT}:8888
environment:
DNS_RESOLVER: 127.0.0.11
HOSTNAME_FLOWER: flower:8080
HOSTNAME_CLIENT_METRICS: api:8080
HOSTNAME_CLIENT_READ: api:8080
HOSTNAME_CLIENT_WRITE: api:8080
HOSTNAME_EMAIL_RECEIVE: api:8080
HOSTNAME_CLIENT_REGISTER: api:8080
depends_on:
- api
- flower

api:
<<: *shared-app-build
Expand Down Expand Up @@ -85,14 +83,6 @@ services:
- azurite
- rabbitmq

flower:
<<: *shared-app-build
command: ["/app/run-flower.sh"]
environment:
<<: *shared-app-environment
FLOWER_USERNAME: flower
FLOWER_PASSWORD: 123456

setup:
image: ${DOCKER_REPO}/opwenserver_setup:${BUILD_TAG}
build:
Expand All @@ -113,6 +103,9 @@ services:

rabbitmq:
image: rabbitmq:management-alpine
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD}

appinsights:
image: cwolff/appinsights-on-premises:0.1.2-postgres
Expand All @@ -138,6 +131,14 @@ services:
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:
Expand Down
1 change: 0 additions & 1 deletion docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ WORKDIR /app

COPY --from=builder /src/docker/docker-entrypoint.sh .
COPY --from=builder /src/docker/app/run-celery.sh .
COPY --from=builder /src/docker/app/run-flower.sh .
COPY --from=builder /src/docker/app/run-gunicorn.sh .
COPY --from=builder /src/opwen_email_server ./opwen_email_server

Expand Down
7 changes: 0 additions & 7 deletions docker/app/run-flower.sh

This file was deleted.

6 changes: 0 additions & 6 deletions docker/nginx/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ http {
root /static;
}

location /flower/ {
rewrite ^/flower/(.*)$ /$1 break;
proxy_pass http://${HOSTNAME_FLOWER};
proxy_set_header Host $host;
}

location /api/email/sendgrid {
proxy_pass http://${HOSTNAME_EMAIL_RECEIVE};
}
Expand Down
43 changes: 0 additions & 43 deletions helm/templates/flower-deployment.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions helm/templates/flower-service.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions helm/templates/nginx-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ spec:
env:
- name: DNS_RESOLVER
value: 127.0.0.1:53 ipv6=off
- name: HOSTNAME_FLOWER
value: "{{ .Release.Name }}-flower:8080"
- name: HOSTNAME_CLIENT_METRICS
value: "{{ .Release.Name }}-api:8080"
- name: HOSTNAME_CLIENT_READ
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ build:
docker-compose build

start:
docker-compose up -d
docker-compose up -d --remove-orphans

logs:
if [ "$(ALL)" = "true" ]; then \
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ beautifulsoup4==4.8.1
cached-property==1.5.1
connexion[flask,swagger-ui]==2.4.0
environs==6.1.0
flower==0.9.3
msgpack==0.6.2
python-http-client==3.2.1
pyzmail36==1.0.4
Expand Down

0 comments on commit 7c30ed9

Please sign in to comment.