Skip to content

Commit

Permalink
Merge pull request #24 from jackblk/pr-patch
Browse files Browse the repository at this point in the history
feat: add github workflow & github package for easier usage
  • Loading branch information
ryanmab authored May 7, 2024
2 parents 166676a + eb8ac50 commit fa55762
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 26 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Publish Docker Image

on:
push:
branches:
- "master"

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/ryanmab/CensorDodge
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# - name: Login to DockerHub
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM php:8.1-apache-buster
MAINTAINER Ryan Maber <[email protected]>
LABEL org.opencontainers.image.authors="[email protected]"
WORKDIR /var/www/html
COPY . /var/www/html/
EXPOSE 80
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,15 @@ This includes an approved and automatic one-click proxy setup tool, which enable

## Running Locally

Censor Dodge can be run locally in two different ways using Docker:
Censor Dodge can be run locally using Docker:

- Using the provided `docker-compose.yml` to compose and build the image and run the container automatically.

```bash
docker-compose up
```

<h3 align="center">OR</h3>

- Using the provided `Dockerfile` to build a custom image and run it as a container.

```bash
docker build . -t censordodge
docker run -p 80:80 -it censordodge
```
```sh
docker run -p 80:80 -it ghcr.io/ryanmab/censordodge
```

## Hosting

Censor Dodge is a software that is designed to run on any basic PHP hosting, regardless of the provider or the package you are using. The software is so lightweight that some people have even reported successfully running it on shared hosting plans that cost as little as $1 per year. In addition to this, Censor Dodge can also be run as a Docker image, which comes with a pre-configured Dockerfile.
Censor Dodge is a software that is designed to run on any basic PHP hosting, regardless of the provider or the package you are using. The software is so lightweight that some people have even reported successfully running it on shared hosting plans that cost as little as $1 per year. In addition to this, Censor Dodge can also be run as a Docker image (using the `ghcr.io/ryanmab/censordodge` image).

One of the major benefits of using Censor Dodge is that you do not need to go through a complicated installation process to get it up and running. The script is already pre-configured, meaning that it is ready to use straight out of the box. All you need to do is ensure that you have enough bandwidth to handle the traffic that you expect to receive, and that you can scale the solution as your traffic grows.

Expand All @@ -56,5 +45,6 @@ If you are planning to use Censor Dodge, it is important to note that the softwa
By Ryan Maber - [View Portfolio](https://ryanmaber.com/)

## Contributors

- [Mossroy](https://github.com/mossroy)
- [abcnet-lu](https://github.com/abcnet-lu)
9 changes: 0 additions & 9 deletions docker-compose.yml

This file was deleted.

0 comments on commit fa55762

Please sign in to comment.