Skip to content

Commit

Permalink
Added github package
Browse files Browse the repository at this point in the history
  • Loading branch information
JexSrs committed Jun 17, 2024
1 parent 5ae5a05 commit c4ee70f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,3 @@ jobs:
tags: |
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/${{ github.event.repository.name }}:latest
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/${{ github.event.repository.name }}:${{ env.VERSION_TAG }}
- name: Deploy (if needed)
run: echo "Deploy step can be customized or automated here"
27 changes: 12 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,47 +34,44 @@ After these setup steps, the program will be ready for use.

## Docker

### Using Docker command
### Using Docker Command

Before using Docker, ensure Docker is installed on your system. Visit [Docker's official installation guide](https://docs.docker.com/get-docker/) for help with the installation.

1. **Build the Docker Image**:
From within the project directory (where the `Dockerfile` is located), build your Docker image:
1. **Pull the Docker Image**:
Pull the latest image of your project directly from GitHub Container Registry:
```bash
docker build -t go-shellcron .
docker pull ghcr.io/jexsrs/go-shellcron:latest
```

2. **Run your Docker Container**:
You can run your Docker container with the following command:
Run the Docker container using the image pulled from GHCR with the following command:
```bash
docker run --name go-shellcron -v $(pwd)/scripts:/scripts -d go-shellcron
docker run --name go-shellcron -v $(pwd)/scripts:/scripts -d ghcr.io/jexsrs/go-shellcron:latest
```

### Using Docker Compose

For an even simpler setup or deployment, you can utilize Docker Compose.

1. **Create a `docker-compose.yml` file**:
Make sure you have a `docker-compose.yml` file in the root of your project with the following content:
Make sure you have a `docker-compose.yml` file in the root of your project with the following content. Note that the `build` option is replaced by directly using the image from GHCR:
```yaml
version: '3.8'
services:
go-shellcron:
container_name: go-shellcron
image: ghcr.io/jexsrs/go-shellcron:latest
restart: always
image: go-shellcron
build:
context: ./
dockerfile: Dockerfile
env_file: ".env"
volumes:
- ./scripts:/scripts
```
2. **Run using Docker Compose**:
If you wish to run the services in the background (detached mode), use:
To start your services using Docker Compose, run:
```bash
docker-compose up -d --build
docker-compose up -d
```


## Script structure
Here is a sample script to be processed by this scheduler:
Expand Down

0 comments on commit c4ee70f

Please sign in to comment.