-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d373b2
commit e3e7d0a
Showing
7 changed files
with
111 additions
and
24 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
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,60 @@ | ||
name: Build and Push Docker images | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Load .env file | ||
# id: dotenv | ||
# uses: falti/[email protected] | ||
|
||
- name: Build and push blackhole image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile.blackhole | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}/blackhole:latest | ||
|
||
- name: Build and push watchlist image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile.watchlist | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}/watchlist:latest | ||
|
||
- name: Build and push plex_authentication image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile.plex_authentication | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}/plex_authentication:latest | ||
|
||
- name: Build and push plex_request image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile.plex_request | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}/plex_request: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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
FROM python:3.8-slim | ||
|
||
# Metadata labels | ||
LABEL org.opencontainers.image.source="https://github.com/westsurname/scripts" | ||
LABEL org.opencontainers.image.description="Docker image for the blackhole service" | ||
|
||
ARG SERVICE_NAME=blackhole | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
COPY . . | ||
# Copy only the files needed for pip install to maximize cache utilization | ||
COPY requirements.txt ./ | ||
|
||
# Install Python dependencies | ||
RUN grep -E "#.*($SERVICE_NAME|all)" requirements.txt | awk '{print $0}' > service_requirements.txt | ||
RUN pip install --no-cache-dir -r service_requirements.txt | ||
RUN grep -E "#.*($SERVICE_NAME|all)" requirements.txt | awk '{print $0}' > service_requirements.txt && \ | ||
pip install --no-cache-dir -r service_requirements.txt | ||
|
||
# Copy the rest of the application | ||
COPY . . | ||
|
||
CMD ["python", "blackhole_watcher.py"] |
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,20 +1,26 @@ | ||
FROM python:3.8-slim | ||
|
||
# Metadata labels | ||
LABEL org.opencontainers.image.source="https://github.com/westsurname/scripts" | ||
LABEL org.opencontainers.image.description="Docker image for the plex_authentication service" | ||
|
||
ARG SERVICE_NAME=plex_authentication | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Copy the current directory contents into the container at /app | ||
COPY . . | ||
# Copy only the files needed for pip install to maximize cache utilization | ||
COPY requirements.txt ./ | ||
|
||
# Install gunicorn and other dependencies | ||
RUN grep -E "#.*($SERVICE_NAME|all)" requirements.txt | awk '{print $0}' > service_requirements.txt | ||
RUN pip install --no-cache-dir gunicorn -r service_requirements.txt | ||
# Install Python dependencies | ||
RUN grep -E "#.*($SERVICE_NAME|all)" requirements.txt | awk '{print $0}' > service_requirements.txt && \ | ||
pip install --no-cache-dir -r service_requirements.txt | ||
|
||
# Copy the rest of the application | ||
COPY . . | ||
|
||
# Expose port 8000 to the outside world | ||
EXPOSE 8000 | ||
|
||
# Run gunicorn on port 8000, add more workers if required | ||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "plex_authentication_wsgi: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 |
---|---|---|
@@ -1,20 +1,26 @@ | ||
FROM python:3.8-slim | ||
|
||
# Metadata labels | ||
LABEL org.opencontainers.image.source="https://github.com/westsurname/scripts" | ||
LABEL org.opencontainers.image.description="Docker image for the plex_request service" | ||
|
||
ARG SERVICE_NAME=plex_request | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Copy the current directory contents into the container at /app | ||
COPY . . | ||
# Copy only the files needed for pip install to maximize cache utilization | ||
COPY requirements.txt ./ | ||
|
||
# Install gunicorn and other dependencies | ||
RUN grep -E "#.*($SERVICE_NAME|all)" requirements.txt | awk '{print $0}' > service_requirements.txt | ||
RUN pip install --no-cache-dir gunicorn -r service_requirements.txt | ||
# Install Python dependencies | ||
RUN grep -E "#.*($SERVICE_NAME|all)" requirements.txt | awk '{print $0}' > service_requirements.txt && \ | ||
pip install --no-cache-dir -r service_requirements.txt | ||
|
||
# Copy the rest of the application | ||
COPY . . | ||
|
||
# Expose port 8000 to the outside world | ||
EXPOSE 8000 | ||
|
||
# Run gunicorn on port 8000, add more workers if required | ||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "plex_request_wsgi: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 |
---|---|---|
@@ -1,14 +1,22 @@ | ||
FROM python:3.8-slim | ||
|
||
# Metadata labels | ||
LABEL org.opencontainers.image.source="https://github.com/westsurname/scripts" | ||
LABEL org.opencontainers.image.description="Docker image for the watchlist service" | ||
|
||
ARG SERVICE_NAME=watchlist | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
COPY . . | ||
# Copy only the files needed for pip install to maximize cache utilization | ||
COPY requirements.txt ./ | ||
|
||
# Install Python dependencies | ||
RUN grep -E "#.*($SERVICE_NAME|all)" requirements.txt | awk '{print $0}' > service_requirements.txt | ||
RUN pip install --no-cache-dir -r service_requirements.txt | ||
RUN grep -E "#.*($SERVICE_NAME|all)" requirements.txt | awk '{print $0}' > service_requirements.txt && \ | ||
pip install --no-cache-dir -r service_requirements.txt | ||
|
||
# Copy the rest of the application | ||
COPY . . | ||
|
||
CMD ["python", "watchlist_runner.py"] |
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