Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: waschinski/cosmos-cert-extractor
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.5
Choose a base ref
...
head repository: waschinski/cosmos-cert-extractor
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 4 commits
  • 3 files changed
  • 1 contributor

Commits on Jun 26, 2024

  1. Copy the full SHA
    59a5677 View commit details
  2. Log startup notification

    waschinski committed Jun 26, 2024
    Copy the full SHA
    187bca9 View commit details
  3. Copy the full SHA
    23fc54f View commit details

Commits on Jun 28, 2024

  1. Create LICENSE

    waschinski authored Jun 28, 2024
    Copy the full SHA
    f7a29f6 View commit details
Showing with 25 additions and 4 deletions.
  1. +3 −3 Dockerfile
  2. +21 −0 LICENSE
  3. +1 −1 extract.py
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Use an appropriate base image
FROM python:3.12-slim
FROM python:3.12-alpine
# Set the working directory for following commands in this docker container to '/app'
WORKDIR /app
# Copy the script into the container
COPY extract.py ./extract.py
# Install any necessary dependencies
RUN pip install watchdog
RUN pip install --no-cache-dir watchdog
# Send stdout and stderr straight to terminal
ENV PYTHONUNBUFFERED 1
# Make sure the script is executable (if necessary)
RUN chmod +x ./extract.py
# Command to run the script
ENTRYPOINT ["python", "./extract.py"]
ENTRYPOINT ["python", "./extract.py"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Andreas Waschinski

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion extract.py
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler


INPUT_PATH = "/input"
CERTS_FOLDER = os.getenv('CERT_SUBFOLDER', '/certs')
CERTS_PATH = "/output" + CERTS_FOLDER
@@ -61,6 +60,7 @@ def main():
event_handler = ConfigFileHandler()
observer.schedule(event_handler, INPUT_PATH, recursive=False)
observer.start()
print("Starting to watch for certificate updates.")
try:
while True:
time.sleep(1)