Commit db1e1cab authored by nimrod's avatar nimrod
Browse files

Complete refactor and reworked usage.

The usage is completely replaced. Now locally I run inside a pipenv and
remotely using Docker.

- Use Supersonic as the Cron daemon.
- Run locally using pipenv.
- Run remotely using Docker (and docker-compose).
- Automate tasks using pipenv custom script shortcuts.
- Updated pre-commit hooks, added yamllint hook.
- Added license.
- Updated README.
parent a08cc415
Loading
Loading
Loading
Loading

.dockerignore

0 → 100644
+4 −0
Original line number Diff line number Diff line
*
!Pipfile*
!poca.xml
!crontab

.envrc

0 → 100644
+2 −0
Original line number Diff line number Diff line
source_up
layout pipenv
+13 −17
Original line number Diff line number Diff line
---
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    sha: v0.7.1
    rev: v2.2.1
    hooks:
    -   id: check-added-large-files
      - id: check-yaml
      - id: check-xml
      - id: check-added-large-files
      - id: check-merge-conflict
-   repo: https://github.com/willthames/ansible-lint
    sha: v3.4.13
    hooks:
    -   id: ansible-lint
        files: playbook\.yml
        args: ['--exclude=roles']
-   repo: https://github.com/adarnimrod/shell-pre-commit
    sha: v0.5.4
      - id: check-symlinks
      - id: trailing-whitespace
  - repo: https://github.com/adrienverge/yamllint
    rev: v1.15.0
    hooks:
    -   id: shell-lint
        files: receiver
    -   id: shellcheck
        files: receiver
      - id: yamllint

Dockerfile

0 → 100644
+17 −0
Original line number Diff line number Diff line
FROM adarnimrod/cron as supersonic

FROM python:3.7-alpine
COPY --from=supersonic /usr/local/bin/supersonic /usr/local/bin/
RUN pip install --no-cache-dir pipenv
COPY Pipfile* /poquita/
WORKDIR /poquita
RUN apk add --update --no-cache --virtual .lxml-build build-base libxslt-dev && \
    pipenv install --deploy --system && \
    apk del .lxml-build && \
    apk add --update --no-cache --virtual .lxml-runtime libxml2 libxslt
COPY --chown=root:root crontab /poquita/
COPY --chown=root:root poca.xml /poquita/
VOLUME /poquita/db/ /poquita/Podcasts/
CMD [ "supersonic", "crontab" ]
USER nobody
HEALTHCHECK CMD pgrep supersonic

LICENSE.txt

0 → 100644
+21 −0
Original line number Diff line number Diff line
MIT License

Copyright (c) 2019 Adar Nimrod

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.
Loading