-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init none working extraction from toloka2mediaserver
- Loading branch information
Showing
17 changed files
with
1,706 additions
and
5 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
tags: maksii/toloka2mediaserver:latest |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python Debugger: Web", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"module": "app", | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Use an official Python runtime as a parent image | ||
FROM python:3 | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
COPY requirements.txt ./ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Copy the Python script and any other necessary files | ||
COPY . . | ||
|
||
# Add the config folder as a volume | ||
VOLUME /app/toloka2MediaServer/data | ||
|
||
# Define the default cron schedule | ||
ENV CRON_SCHEDULE="0 8 * * *" | ||
|
||
# Add the cron job to run toloka2transmission | ||
ADD crontab /etc/cron.d/cron-job | ||
RUN chmod 0644 /etc/cron.d/cron-job | ||
RUN touch /var/log/cron.log | ||
|
||
# Start cron service | ||
CMD cron && tail -f /var/log/cron.log | ||
|
||
# Make port available to the world outside this container | ||
EXPOSE 5000 | ||
|
||
# Define environment variable | ||
ENV PORT 5000 | ||
|
||
# Start-up script to run both cron and the web server | ||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh | ||
ENTRYPOINT ["docker-entrypoint.sh"] |
Oops, something went wrong.