Skip to content

Commit

Permalink
Import old Ashkandi code
Browse files Browse the repository at this point in the history
  • Loading branch information
secretbis committed Dec 18, 2024
0 parents commit b38e9cd
Show file tree
Hide file tree
Showing 18 changed files with 7,380 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.env
42 changes: 42 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: master

on:
push:
branches:
- master

env:
CI: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- uses: actions/setup-node@v1
with:
node-version: '14.2'
- run: npm install
- run: npm test

- name: Docker Build and Publish
uses: elgohr/[email protected]
with:
name: jcavanagh/rallying-cry-calendar
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
registry: registry.hub.docker.com
tags: master
snapshot: true

- name: Setup Deploy
uses: matootie/[email protected]
with:
personalAccessToken: ${{ secrets.DIGITALOCEAN_TOKEN }}
clusterName: jcavanagh

- name: Deploy
run: |
kubectl -n rcc apply -f deploy/cronjob.yml
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.env
*.log
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": true,
"singleQuote": true,
"printWidth": 120
}
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:14.2-slim

WORKDIR /app
COPY package*.json ./
COPY src ./src

RUN npm install

CMD ["node", "src/index.js"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# rallying-cry-calendar
34 changes: 34 additions & 0 deletions deploy/cronjob.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: rallying-cry-calendar
spec:
schedule: '*/5 * * * *'
startingDeadlineSeconds: 600
jobTemplate:
spec:
template:
spec:
containers:
- name: rallying-cry-calendar-cron
imagePullPolicy: Always
image: registry.hub.docker.com/jcavanagh/rallying-cry-calendar:master
env:
- name: NODE_DEBUG
value: rcc
- name: DISCORD_BOT_TOKEN
valueFrom:
secretKeyRef:
key: DISCORD_BOT_TOKEN
name: discord-token
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
key: AWS_ACCESS_KEY_ID
name: aws-user
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
key: AWS_SECRET_ACCESS_KEY
name: aws-user
restartPolicy: OnFailure
Loading

0 comments on commit b38e9cd

Please sign in to comment.