Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup docker compose #533

Merged
merged 2 commits into from
Mar 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ WORKDIR /var/www
ADD requirements.txt /var/www/requirements.txt
RUN apk add --no-cache \
python3=3.8.2-r0 \
libstdc++=9.2.0-r3 \
libstdc++=9.2.0-r4 \
mpc1-dev=1.1.0-r1 \
yajl=2.1.0-r0 \
libpq=12.2-r0 && \
ln -s /usr/bin/python3 /usr/bin/python && \
ln -s /usr/bin/pip3 /usr/bin/pip && \
apk add --no-cache --virtual .build-deps \
g++=9.2.0-r3 \
g++=9.2.0-r4 \
python3-dev=3.8.2-r0 \
yajl-dev=2.1.0-r0 \
postgresql-dev=12.2-r0 \
libffi-dev=3.2.1-r6 \
gmp-dev=6.1.2-r1 \
mpfr-dev=4.0.2-r1 \
wait4ports=0.2.3-r0 && \
pip install pip==20.0.2 setuptools==45.2.0 wheel==0.34.2 && \
pip install pip==20.0.2 setuptools==46.1.1 wheel==0.34.2 && \
pip install --upgrade -r requirements.txt && \
apk del --no-cache .build-deps && \
rm -fr /tmp/* /var/cache/apk/* /root/.cache/pip
Expand Down
1 change: 1 addition & 0 deletions base/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ colorama==0.4.3 # required for structlog
connexion==2.6.0
Flask-Opentracing==1.1.0
Flask==1.1.1
flower==0.9.3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is that for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they look pretty 🌹

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flower is a celery monitoring tool - we have an example use in the docker-compose file (commented out).

gunicorn==20.0.4
ijson==2.6.1
iso8601==0.1.12
Expand Down
26 changes: 9 additions & 17 deletions tools/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ services:
- psql:/var/lib/postgresql/data
#ports:
#- 5432:5432
healthcheck:
test: pg_isready -q -h db -p 5432 -U postgres
interval: 5s
timeout: 30s
retries: 5

minio:
image: minio/minio:RELEASE.2017-02-16T01-47-30Z
Expand Down Expand Up @@ -42,7 +47,6 @@ services:
- redis
- minio


# The application server can also setup the database
db_init:
image: data61/anonlink-app:${TAG:-latest}
Expand All @@ -54,18 +58,6 @@ services:
depends_on:
- db

# The dm admin
db_admin:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we not need the db_admin any more?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect no one other than myself ever used it. It is useful to see the time queries take and see the locks on the database. Want me to put it in a developer-tools.yml file or something?

image: dpage/pgadmin4
environment:
- PGADMIN_DEFAULT_PASSWORD=rX%QpV7Xgyrz
- PGADMIN_DEFAULT_EMAIL=brian@thorne.link
depends_on:
- db
ports:
- 5050:80


# A celery worker
worker:
image: data61/anonlink-app:${TAG:-latest}
Expand Down Expand Up @@ -98,13 +90,13 @@ services:
PUBLIC_PORT: 8851


# A celery monitor. Useful for debugging but okay to remain
# commented out for deployment. Access via the nginx container with url `/monitor`
# A celery monitor. Useful for debugging.
# celery_monitor:
# image: quay.io/n1analytics/entity-app
# image: data61/anonlink-app:${TAG:-latest}
# depends_on:
# - redis
# entrypoint: celery flower -A entityservice.async_worker --basic_auth=n1:paillier --url_prefix=/ --port=8888 -Q celery,compute
# - worker
# command: celery flower -A entityservice.async_worker
# ports:
# - 8888:8888

Expand Down