Skip to content

Commit d799c23

Browse files
committed
chore: update package dependencies and package manager version
1 parent d7f4cd8 commit d799c23

5 files changed

Lines changed: 251 additions & 321 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ jobs:
2525
build:
2626
runs-on: ubuntu-latest
2727

28-
permissions:
29-
contents: read
30-
packages: write
31-
attestations: write
32-
id-token: write
33-
3428
outputs:
3529
image_name: ${{ steps.metadata.outputs.image_name }}
3630
image_title: ${{ steps.metadata.outputs.image_title }}
@@ -110,7 +104,7 @@ jobs:
110104
runs-on: ubuntu-latest
111105

112106
steps:
113-
- name: Deploy to VPS
107+
- name: 🔀 Deploy to VPS
114108
uses: appleboy/ssh-action@v1.1.0
115109
with:
116110
host: ${{ secrets.VPS_HOST }}
@@ -119,4 +113,4 @@ jobs:
119113
script: |
120114
cd ~/${{ env.REPO }}
121115
curl -O https://raw.githubusercontent.com/${{ env.REPO }}/refs/heads/main/docker-compose.prod.yml
122-
docker stack deploy --compose-file docker-compose.prod.yml unauth
116+
docker stack deploy --compose-file docker-compose.prod.yml unauth-api

README.md

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,76 @@
44

55
# UnAuth API
66

7-
> Global REST API Authentication Service
8-
97
<p align="center">
108
<a href="https://uptime.betterstack.com/?utm_source=status_badge">
119
<img src="https://uptime.betterstack.com/status-badges/v3/monitor/10kju.svg" alt="uptime status">
1210
</a>
1311
</p>
1412

15-
# TODO
13+
> Global REST API Authentication Service
14+
15+
- 🐋 Containerized
16+
- 🪄 CI/CD (Github Action)
17+
- ⚡️ API Route Caching
18+
- 📐 Analytics
19+
20+
- [ ] Rate Limiting
21+
- [ ] Maintain blocklist
22+
23+
## How to Deploy
24+
25+
1. Initialize Swarm on the Manager Node
26+
27+
```bash
28+
docker swarm init --advertise-addr <MANAGER-IP>
29+
```
30+
31+
2. Join Worker Nodes to the Swarm
32+
33+
```bash
34+
docker swarm join --token <WORKER-TOKEN> <MANAGER-IP>:2377
35+
```
36+
37+
3. Check Node Status
38+
39+
```bash
40+
docker node ls
41+
```
42+
43+
4. Create a docker volume
44+
45+
```bash
46+
docker volume create \
47+
--name unauth-api_data \
48+
--driver local \
49+
--opt type=none \
50+
--opt device=~/Algostract/unauth-api/.data \
51+
--opt o=bind
52+
```
53+
54+
5. Use Docker Stack to deploy multi-container application
55+
56+
```bash
57+
docker stack deploy --compose-file docker-compose.prod.yml unauth-api
58+
```
59+
60+
6. Scale service
61+
62+
```bash
63+
docker service scale unauth-api_app=2
64+
```
65+
66+
7. Verify
67+
68+
```bash
69+
docker service ls
70+
docker service ps unauth-api_app
71+
```
72+
73+
## License
1674

17-
- Rate Limiting
18-
- Maintain blocklist
75+
Published under the [MIT](https://github.com/shba007/unauth-api/blob/main/LICENSE) license.
76+
<br><br>
77+
<a href="https://github.com/shba007/unauth-api/graphs/contributors">
78+
<img src="https://contrib.rocks/image?repo=shba007/unauth-api" />
79+
</a>

0 commit comments

Comments
 (0)