Skip to content

Commit

Permalink
Update web logs and remove old file
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlienharrell committed Jan 11, 2025
1 parent 7bd82dc commit f9faa24
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 187 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ COPY --chown=hpcperfstats:hpcperfstats . .

RUN pip install .

RUN mkdir -p /hpcperfstats/

ADD services-conf/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

11 changes: 10 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ services:
command: /home/hpcperfstats/services-conf/django_startup.sh
env_file:
- ./.env.dev
volumes:
- hpcperfstatsweblog:/hpcperfstats/logs/

pipeline:
image: hpcperfstats
Expand Down Expand Up @@ -52,10 +54,17 @@ volumes:
postgres_data:

rabbitmq_messages:

hpcperfstatsdata:
driver: local
driver_opts:
type: none
device: /home/sharrell/compose_test/hpcperfstats_data/
o: bind

hpcperfstatsweblog:
driver: local
driver_opts:
type: none
device: /home/sharrell/compose_test/hpcperfstats_log
o: bind
2 changes: 1 addition & 1 deletion hpcperfstats/site/hpcperfstats_site/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
'logfile': {
'level':'INFO',
'class':'logging.handlers.RotatingFileHandler',
'filename': os.path.join('/tmp', 'hpcperfstats_site.log'),
'filename': os.path.join('/hpcperfstats/logs/', 'hpcperfstats_site.log'),
'maxBytes': 1024*1024*15, # 15MB
'backupCount': 10,
},
Expand Down
185 changes: 0 additions & 185 deletions monitor/src/opa.c.bak

This file was deleted.

57 changes: 57 additions & 0 deletions patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
diff --git a/Dockerfile b/Dockerfile
index cb18d17..ba490eb 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -27,5 +27,7 @@ COPY --chown=hpcperfstats:hpcperfstats . .

RUN pip install .

+RUN mkdir -p /hpcperfstats/
+
ADD services-conf/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

diff --git a/docker-compose.yml b/docker-compose.yml
index 62abe4d..4030d67 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -5,6 +5,8 @@ services:
command: /home/hpcperfstats/services-conf/django_startup.sh
env_file:
- ./.env.dev
+ volumes:
+ - hpcperfstatsweblog:/hpcperfstats/log/

pipeline:
image: hpcperfstats
@@ -52,10 +54,17 @@ volumes:
postgres_data:

rabbitmq_messages:
-
+
hpcperfstatsdata:
driver: local
driver_opts:
type: none
device: /home/sharrell/compose_test/hpcperfstats_data/
o: bind
+
+ hpcperfstatsweblog:
+ driver: local
+ driver_opts:
+ type: none
+ device: /home/sharrell/compose_test/hpcperfstats_weblog/
+ o: bind
diff --git a/hpcperfstats/site/hpcperfstats_site/settings.py b/hpcperfstats/site/hpcperfstats_site/settings.py
index ee9b4d3..f7c44ac 100644
--- a/hpcperfstats/site/hpcperfstats_site/settings.py
+++ b/hpcperfstats/site/hpcperfstats_site/settings.py
@@ -215,7 +215,7 @@ LOGGING = {
'logfile': {
'level':'INFO',
'class':'logging.handlers.RotatingFileHandler',
- 'filename': os.path.join('/tmp', 'hpcperfstats_site.log'),
+ 'filename': os.path.join('/hpcperfstats/log/', 'hpcperfstats_site.log'),
'maxBytes': 1024*1024*15, # 15MB
'backupCount': 10,
},
3 changes: 3 additions & 0 deletions services-conf/django_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ done

echo "PostgreSQL started"


chown -R hpcperfstats:hpcperfstats /hpcperfstats/

# detect if the tables are existing and create if not
/usr/local/bin/python3 hpcperfstats/site/manage.py makemigrations
/usr/local/bin/python3 hpcperfstats/site/manage.py migrate
Expand Down

0 comments on commit f9faa24

Please sign in to comment.