https://github.com/themisir/mutexserver
Mutex server for synchronizing commits to GitOps repositories using CI/CD
https://github.com/themisir/mutexserver
devops gitops mutex mutex-server synchronization
Last synced: about 3 hours ago
JSON representation
Mutex server for synchronizing commits to GitOps repositories using CI/CD
- Host: GitHub
- URL: https://github.com/themisir/mutexserver
- Owner: themisir
- Created: 2020-10-27T12:02:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-09-10T07:23:19.000Z (almost 4 years ago)
- Last Synced: 2026-04-24T08:43:12.383Z (2 months ago)
- Topics: devops, gitops, mutex, mutex-server, synchronization
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mutexserver
Simple http service for setting up mutex service. For example set mutex for parallel GitOps repository commits.
## Server
To start mutex server you need to install Node.js and simply run `node server.js`. You can customize mutex lifetime using `TTL` and server port using `PORT` environment variable. You can also use docker image for running mutex server.
```sh
docker pull themisir/mutexserver
docker run -p 5000:80 themisir/mutexserver
```
| URI | Description |
|---------------------|----------------------------------------------|
| **POST** `http://localhost:5000/` | Waits for _key_ unlock then locks the mutex. |
| **DELETE** `http://localhost:5000/` | Unlocks mutex. |
## cURL
Using curl commands you can easily lock/unlock mutexes.
```sh
# Will lock the mutex, if mutex is already locked the command will wait until mutex becomes unlocked
curl -XPOST http://localhost:5000/key
# Unlocks mutex
curl -XDELETE http://localhost:5000/key
```
## Github Actions
You can use GitHub actions jobs to queue parallel jobs.
```yaml
- name: Create mutex
uses: themisir/mutexserver@v1
with:
server: http://example.com
key: my-mutex-key
```