Skip to content

Commit

Permalink
Rename (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSincere authored Oct 15, 2024
1 parent cf31b51 commit a018c0b
Show file tree
Hide file tree
Showing 136 changed files with 203 additions and 204 deletions.
2 changes: 1 addition & 1 deletion .env.development.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DATABASE_URL=postgres://fqauth:FQAuthServer@localhost/fqauth_dev
DATABASE_URL=postgres://sincereauth:SincereAuthServer@localhost/sincereauth_dev
REDIS_URL=redis://localhost
APPLE_SERVICES_KEY=com.fullqueuedeveloper.FQAuthServer
APPLE_SERVICES_KEY_ID=com.fullqueuedeveloper.FQAuthServer
Expand Down
2 changes: 1 addition & 1 deletion .env.testing.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DB_SYMMETRIC_KEY=9/Vk5Rlzctc5tyX0SCmIJaRzEg+QgwWjlTzD0LMPqNY=
DATABASE_URL=postgres://fqauth:FQAuthServer@localhost/fqauth_test
DATABASE_URL=postgres://sincereauth:SincereAuthServer@localhost/sincereauth_test
REDIS_URL=redis://localhost
APPLE_SERVICES_KEY_ID=com.fullqueuedeveloper.FQAuthServer
APPLE_TEAM_ID=FQDV1234
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:

build-mac:
name: Build on Mac
runs-on: macos-12
runs-on: macos-13
steps:
- uses: swift-actions/setup-swift@v1
with:
Expand Down Expand Up @@ -154,14 +154,15 @@ jobs:
swift-version: 5.9
- run: swift --version
- uses: actions/checkout@v3
- run: swift run FQAuthServer migrate -y --env test
- run: swift run SincereAuthServer migrate -y --env test
- run: swift test

test-mac:
name: Test on Mac
runs-on: macos-12
runs-on: macos-13
steps:
- run: |
brew install postgresql
brew services start postgresql
echo "Check PostgreSQL service is running"
i=10
Expand Down Expand Up @@ -191,7 +192,7 @@ jobs:
- run: swift --version
- uses: shogo82148/actions-setup-redis@v1
- uses: actions/checkout@v3
- run: swift run FQAuthServer migrate -y --env test
- run: swift run SincereAuthServer migrate -y --env test
- run: swift test
env:
DATABASE_URL: "postgresql://myuser:mypassword@localhost/mydatabase"
Expand Down
2 changes: 1 addition & 1 deletion Deploy/Fly.io/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/fullqueuedeveloper/fqauth:0.2.3
FROM ghcr.io/fullqueuedeveloper/sincereauth:0.2.3
4 changes: 2 additions & 2 deletions Deploy/Fly.io/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
1. Provision a Postgres database
2. Provision a Redis instance

## Setup FQAuth
## Setup SincereAuth

1. Clone the FQAuth repo.
1. Clone the SincereAuth repo.
2. Set environment variables using `flyctl secrets set MY_SECRET=value`

- `AUTH_PRIVATE_KEY`: Base64. Output of `swish generate-jwt-key`
Expand Down
2 changes: 1 addition & 1 deletion Deploy/Heroku/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/fullqueuedeveloper/fqauth:0.2.3
FROM ghcr.io/fullqueuedeveloper/sincereauth:0.2.3
8 changes: 4 additions & 4 deletions Deploy/Heroku/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Install heroku cli tool from Homebrew
## Setup.

1. Create a Heroku account
2. Create an app on Heroku, perhaps named "fqauth-server-{name}"
2. Create an app on Heroku, perhaps named "sincereauth-server-{name}"
3. Provision this app with a Postgres DB and a Redis DB
4. Set config variables in Heroku's web portal or thru the command line

Expand All @@ -23,9 +23,9 @@ Install heroku cli tool from Homebrew
- `RUN_QUEUES_IN_MAIN_PROCESS` - When limited in number of process, you may run the queues in-process by setting this variable to `YES`. If you can only run one extra process, prioritize the regular queues variable (this one).
- `RUN_AUTO_MIGRATE` - When limited in number of process, you may run the database in-process by setting this variable to `YES`. This is only safe when you are only running 1 replica of the main app process.

5. Clone the FQAuth repo to your local computer
6. Choose container stack `heroku stack:set -a fqauth-server-{name} container` (app name is from step 2)
7. Setup heroku remote `heroku git:remote -a fqauth-server-{name}`
5. Clone the SincereAuth repo to your local computer
6. Choose container stack `heroku stack:set -a sincereauth-server-{name} container` (app name is from step 2)
7. Setup heroku remote `heroku git:remote -a sincereauth-server-{name}`
8. Push to heroku `git push heroku trunk:main`
9. After you login the first time, you may manually add the admin role to your user in the database, as that's not supported yet in the UI.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: fqauth
name: sincereauth
labels:
name: fqauth
name: sincereauth
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
name: fqauth.secrets
namespace: fqauth
name: sincereauth.secrets
namespace: sincereauth
type: Opaque
stringData:
# from your hosting provider
DATABASE_URL: postgres://postgres/fqauth_prod
REDIS_URL: redis://fqauth_redis
DATABASE_URL: postgres://postgres/sincereauth_prod
REDIS_URL: redis://sincereauth_redis

# spx generate-db-key
DB_SYMMETRIC_KEY: 8MwwngvgA/fJhxBqY7CP3rWYPG1qDAJUZIHOvFQIZ5E=
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
apiVersion: v1
kind: Service
metadata:
name: fqauth-redis
namespace: fqauth
name: sincereauth-redis
namespace: sincereauth
spec:
ports:
- name: redis
port: 6379
targetPort: 6379
protocol: TCP
selector:
app: fqauth-redis
app: sincereauth-redis
---
apiVersion: v1
kind: ReplicationController
metadata:
name: fqauth-redis
namespace: fqauth
name: sincereauth-redis
namespace: sincereauth
spec:
replicas: 1
template:
metadata:
labels:
app: fqauth-redis
app: sincereauth-redis
spec:
containers:
- name: fqauth-redis
- name: sincereauth-redis
image: redis:alpine
ports:
- containerPort: 6379
Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
apiVersion: batch/v1
kind: Job
metadata:
name: fqauth-release-0-2-3
namespace: fqauth
name: sincereauth-release-0-2-3
namespace: sincereauth
labels:
app: fqauth-release-0-2-3
app: sincereauth-release-0-2-3
spec:
template:
spec:
restartPolicy: Never
containers:
- name: fqauth-release
image: ghcr.io/fullqueuedeveloper/fqauth-release:0.2.3
- name: sincereauth-release
image: ghcr.io/fullqueuedeveloper/sincereauth-release:0.2.3
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: DATABASE_URL
- name: REDIS_URL
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: REDIS_URL
- name: AUTH_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: AUTH_PRIVATE_KEY
- name: APPLE_SERVICES_KEY
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: APPLE_SERVICES_KEY
- name: APPLE_SERVICES_KEY_ID
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: APPLE_SERVICES_KEY_ID
- name: APPLE_TEAM_ID
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: APPLE_TEAM_ID
- name: APPLE_APP_ID
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: APPLE_APP_ID
- name: DB_SYMMETRIC_KEY
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: DB_SYMMETRIC_KEY
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: fqauth-queues-deployment
namespace: fqauth
name: sincereauth-scheduled-queues-deployment
namespace: sincereauth
labels:
app: fqauth-queues
app: sincereauth-scheduled-queues
spec:
replicas: 1
selector:
matchLabels:
app: fqauth-queues
app: sincereauth-scheduled-queues
template:
metadata:
labels:
app: fqauth-queues
app: sincereauth-scheduled-queues
spec:
containers:
- name: fqauth-queues
image: ghcr.io/fullqueuedeveloper/fqauth-queues:0.2.3
- name: sincereauth-scheduled-queues
image: ghcr.io/fullqueuedeveloper/sincereauth-scheduled-queues:0.2.3
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: DATABASE_URL
- name: REDIS_URL
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: REDIS_URL
- name: AUTH_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: AUTH_PRIVATE_KEY
- name: APPLE_SERVICES_KEY
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: APPLE_SERVICES_KEY
- name: APPLE_SERVICES_KEY_ID
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: APPLE_SERVICES_KEY_ID
- name: APPLE_TEAM_ID
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: APPLE_TEAM_ID
- name: APPLE_APP_ID
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: APPLE_APP_ID
- name: DB_SYMMETRIC_KEY
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: DB_SYMMETRIC_KEY
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: fqauth-scheduled-queues-deployment
namespace: fqauth
name: sincereauth-queues-deployment
namespace: sincereauth
labels:
app: fqauth-scheduled-queues
app: sincereauth-queues
spec:
replicas: 1
selector:
matchLabels:
app: fqauth-scheduled-queues
app: sincereauth-queues
template:
metadata:
labels:
app: fqauth-scheduled-queues
app: sincereauth-queues
spec:
containers:
- name: fqauth-scheduled-queues
image: ghcr.io/fullqueuedeveloper/fqauth-scheduled-queues:0.2.3
- name: sincereauth-queues
image: ghcr.io/fullqueuedeveloper/sincereauth-queues:0.2.3
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: DATABASE_URL
- name: REDIS_URL
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: REDIS_URL
- name: AUTH_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: AUTH_PRIVATE_KEY
- name: APPLE_SERVICES_KEY
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: APPLE_SERVICES_KEY
- name: APPLE_SERVICES_KEY_ID
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: APPLE_SERVICES_KEY_ID
- name: APPLE_TEAM_ID
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: APPLE_TEAM_ID
- name: APPLE_APP_ID
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: APPLE_APP_ID
- name: DB_SYMMETRIC_KEY
valueFrom:
secretKeyRef:
name: fqauth.secrets
name: sincereauth.secrets
key: DB_SYMMETRIC_KEY
Loading

0 comments on commit a018c0b

Please sign in to comment.