-
Notifications
You must be signed in to change notification settings - Fork 1
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
make canarie-api independent of cron and proxy #18
Merged
fmigneault
merged 18 commits into
Ouranosinc:master
from
mishaschwartz:more-flexibility
Aug 29, 2023
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1af5813
make canarie-api independent of cron and proxy
mishaschwartz 4463cc7
update UI to reflect changes
mishaschwartz 906dabd
logging updates
mishaschwartz b0cbcef
partial fix for log sharing
mishaschwartz 3371450
parse logs better
mishaschwartz c30b7b7
make parse_logs the only optional one
mishaschwartz 03bccb3
cleanup
mishaschwartz a6faa2c
style updates and cleanup code
mishaschwartz 8b1eb58
move docker-specific files to docker directory
mishaschwartz 70a10f7
Merge branch 'master' into more-flexibility
fmigneault f61f354
fix extra blank line
mishaschwartz 249fd3d
review suggestions
mishaschwartz 32cba10
don't modify global variables
mishaschwartz 597ef22
update Makefile to handle default data dir
mishaschwartz e40c2e1
minor edits and add clarifying comments
mishaschwartz 580f17f
Merge branch 'master' into more-flexibility
mishaschwartz 0265941
Merge branch 'master' into more-flexibility
mishaschwartz 386028d
doc/typing updates
mishaschwartz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM nginx:stable-bullseye | ||
FROM python:3.11 | ||
LABEL description="CanarieAPI: Self describing REST service for Canarie registry." | ||
LABEL maintainer="David Byrns <[email protected]>, Francis Charette-Migneault <[email protected]>" | ||
LABEL vendor="Ouranosinc, CRIM" | ||
|
@@ -8,7 +8,7 @@ ENV PKG_DIR=/opt/local/src/CanarieAPI | |
WORKDIR ${PKG_DIR} | ||
|
||
# Add logparser cron job in the cron directory | ||
ADD canarieapi-cron /etc/cron.d/canarieapi-cron | ||
ADD docker/canarieapi-cron /etc/cron.d/canarieapi-cron | ||
RUN chmod 0644 /etc/cron.d/canarieapi-cron | ||
|
||
# Install dependencies | ||
|
@@ -17,12 +17,8 @@ COPY requirements.txt setup.* README.rst CHANGES.rst ${PKG_DIR}/ | |
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
build-essential \ | ||
python3-dev \ | ||
python3-pip \ | ||
cron \ | ||
sqlite3 \ | ||
&& ln -s $(which pip3) /usr/local/bin/pip \ | ||
&& ln -s $(which python3) /usr/bin/python \ | ||
&& pip install --no-cache-dir --upgrade pip setuptools gunicorn gevent \ | ||
&& pip install --no-cache-dir --upgrade -r ${PKG_DIR}/requirements.txt \ | ||
&& pip install --no-cache-dir -e ${PKG_DIR} | ||
|
@@ -31,19 +27,11 @@ RUN apt-get update \ | |
COPY ./ ${PKG_DIR}/ | ||
RUN pip install --no-dependencies ${PKG_DIR} | ||
|
||
# cron job will inherit the current user environment | ||
# start cron service | ||
# start nginx service | ||
# start gunicorn | ||
CMD env >> /etc/environment \ | ||
&& cron \ | ||
&& gunicorn \ | ||
-b 0.0.0.0:2000 \ | ||
--workers 1 \ | ||
--log-level=DEBUG \ | ||
--timeout 30 \ | ||
--daemon \ | ||
-k gevent \ | ||
canarieapi.wsgi \ | ||
&& nginx \ | ||
-g "daemon off;" | ||
CMD gunicorn \ | ||
-b 0.0.0.0:2000 \ | ||
--workers 1 \ | ||
--log-level=DEBUG \ | ||
--timeout 30 \ | ||
-k gevent \ | ||
canarieapi.wsgi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes breaking changes.
Need to consider MAJOR revision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree