Skip to content

Commit

Permalink
Fixing docker volumes and adding Fixing certego#7
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0elliot committed Apr 5, 2023
1 parent f76526c commit 94428e5
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 10 deletions.
1 change: 0 additions & 1 deletion buffalogs/buffalogs/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# Load task modules from all registered Django apps.
app.autodiscover_tasks()


# Dump requests
@app.task(bind=True)
def debug_task(self):
Expand Down
1 change: 1 addition & 0 deletions buffalogs/buffalogs/settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"django.contrib.messages",
"django.contrib.staticfiles",
"impossible_travel",
"django_celery_beat"
]

MIDDLEWARE = [
Expand Down
Binary file added buffalogs/celerybeat-schedule
Binary file not shown.
1 change: 1 addition & 0 deletions buffalogs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ asgiref==3.5.2
billiard==3.6.4.0
black==22.12.0
celery==5.2.7
django-celery-beat==2.5.0
certifi==2022.9.24
cfgv==3.3.1
click==8.1.3
Expand Down
2 changes: 1 addition & 1 deletion buffalogs/run_beat.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

celery -A buffalogs beat
celery -A buffalogs beat -l info --loglevel=debug
3 changes: 1 addition & 2 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM python:3.10-slim-bullseye
ENV INSTALL_PATH /opt/certego
RUN mkdir -p $INSTALL_PATH
WORKDIR $INSTALL_PATH
COPY requirements.txt requirements.txt
COPY buffalogs/requirements.txt requirements.txt


RUN sed -i 's/main/main non-free/g' /etc/apt/sources.list \
Expand All @@ -16,7 +16,6 @@ RUN sed -i 's/main/main non-free/g' /etc/apt/sources.list \
RUN pip install --no-cache-dir -r requirements.txt \
&& rm -f requirements.txt && apt-get -y purge gcc && apt-get -y autoremove && apt-get -y clean


COPY buffalogs/ /opt/certego/buffalogs/
RUN chmod +x /opt/certego/buffalogs/run.sh; chmod +x /opt/certego/buffalogs/run_worker.sh; chmod +x /opt/certego/buffalogs/run_beat.sh;
WORKDIR /opt/certego/buffalogs/
Expand Down
10 changes: 4 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: '3.2'

services:

postgres:
container_name: buffalogs_postgres
image: postgres:15.1-alpine
Expand All @@ -12,7 +11,7 @@ services:
- postgres_data:/var/lib/postgresql/data
ports:
- "127.0.0.1:5432:5432"

elasticsearch:
container_name: buffalogs_elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.7
Expand All @@ -35,8 +34,6 @@ services:
- "127.0.0.1:9200:9200"
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
expose:
- "9200"
healthcheck:
test: curl -XGET 'localhost:9200/_cluster/health?wait_for_status=yellow&timeout=180s&pretty'

Expand Down Expand Up @@ -85,12 +82,12 @@ services:
volumes:
- django_static:/var/www
- nginx_sockets:/var/run/nginx-sockets
- ./buffalogs:/opt/certego/buffalogs
depends_on:
- postgres
- elasticsearch
- rabbitmq


rabbitmq:
container_name: rabbitmq
image: rabbitmq:3.11-management-alpine
Expand Down Expand Up @@ -120,6 +117,7 @@ services:
- ./run_worker.sh
volumes:
- ./config:/opt/certego/config:ro
- ./buffalogs:/opt/certego/buffalogs
depends_on:
- postgres
- elasticsearch
Expand All @@ -138,13 +136,13 @@ services:
- ./run_beat.sh
volumes:
- ./config:/opt/certego/config:ro
- ./buffalogs:/opt/certego/buffalogs
depends_on:
- postgres
- elasticsearch
- rabbitmq

volumes:

elasticsearch_data:
driver: local
postgres_data:
Expand Down

0 comments on commit 94428e5

Please sign in to comment.