Updating name references
This commit is contained in:
+3
-3
@@ -1,11 +1,11 @@
|
|||||||
SECRET_KEY=NULqYIzgt28bTiyziCd7IOO7b6LnWDW!
|
SECRET_KEY=NULqYIzgt28bTiyziCd7IOO7b6LnWDW!
|
||||||
DB_AUTH_NAME=textsender_auth_db
|
DB_AUTH_NAME=schedtxt_auth_db
|
||||||
DB_AUTH_USER=textsender_auth
|
DB_AUTH_USER=schedtxt_auth
|
||||||
DB_AUTH_PASSWORD=password
|
DB_AUTH_PASSWORD=password
|
||||||
DB_AUTH_HOST=auth_db
|
DB_AUTH_HOST=auth_db
|
||||||
DB_AUTH_PORT=5432
|
DB_AUTH_PORT=5432
|
||||||
DB_AUTH_SSLMODE=disable
|
DB_AUTH_SSLMODE=disable
|
||||||
DATABASE_URL=postgres://${DB_AUTH_USER}:${DB_AUTH_PASSWORD}@${DB_AUTH_HOST}:${DB_AUTH_PORT}/${DB_AUTH_NAME}
|
DATABASE_URL=postgres://${DB_AUTH_USER}:${DB_AUTH_PASSWORD}@${DB_AUTH_HOST}:${DB_AUTH_PORT}/${DB_AUTH_NAME}
|
||||||
ENABLE_REGISTRATION=true
|
ENABLE_REGISTRATION=true
|
||||||
ALLOWED_ORIGINS="http://textsender.com,http://localhost:5173,http://localhost:9080"
|
ALLOWED_ORIGINS="http://schedtxt.com,http://localhost:5173,http://localhost:9080"
|
||||||
APP_ENV=production
|
APP_ENV=production
|
||||||
|
|||||||
+3
-3
@@ -1,11 +1,11 @@
|
|||||||
SECRET_KEY=NULqYIzgt28bTiyziCd7IOO7b6LnWDW!
|
SECRET_KEY=NULqYIzgt28bTiyziCd7IOO7b6LnWDW!
|
||||||
DB_AUTH_NAME=textsender_auth_db
|
DB_AUTH_NAME=schedtxt_auth_db
|
||||||
DB_AUTH_USER=textsender_auth
|
DB_AUTH_USER=schedtxt_auth
|
||||||
DB_AUTH_PASSWORD=password
|
DB_AUTH_PASSWORD=password
|
||||||
DB_AUTH_HOST=localhost
|
DB_AUTH_HOST=localhost
|
||||||
DB_AUTH_PORT=5432
|
DB_AUTH_PORT=5432
|
||||||
DB_AUTH_SSLMODE=disable
|
DB_AUTH_SSLMODE=disable
|
||||||
DATABASE_URL=postgres://${DB_AUTH_USER}:${DB_AUTH_PASSWORD}@${DB_AUTH_HOST}:${DB_AUTH_PORT}/${DB_AUTH_NAME}
|
DATABASE_URL=postgres://${DB_AUTH_USER}:${DB_AUTH_PASSWORD}@${DB_AUTH_HOST}:${DB_AUTH_PORT}/${DB_AUTH_NAME}
|
||||||
ENABLE_REGISTRATION=true
|
ENABLE_REGISTRATION=true
|
||||||
ALLOWED_ORIGINS="http://textsender.com,http://localhost:5173,http://localhost:9080"
|
ALLOWED_ORIGINS="http://schedtxt.com,http://localhost:5173,http://localhost:9080"
|
||||||
APP_ENV=production
|
APP_ENV=production
|
||||||
|
|||||||
@@ -21,12 +21,12 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
|
|
||||||
cargo check
|
cargo check
|
||||||
|
|
||||||
@@ -43,12 +43,12 @@ jobs:
|
|||||||
- run: rustup component add rustfmt
|
- run: rustup component add rustfmt
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
@@ -63,10 +63,10 @@ jobs:
|
|||||||
- run: rustup component add clippy
|
- run: rustup component add clippy
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
cargo clippy -- -D warnings
|
cargo clippy -- -D warnings
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: textsender_auth Build
|
name: schedtxt_auth Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -21,12 +21,12 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
|
|
||||||
cargo check
|
cargo check
|
||||||
|
|
||||||
@@ -81,12 +81,12 @@ jobs:
|
|||||||
ENABLE_REGISTRATION: 'TRUE'
|
ENABLE_REGISTRATION: 'TRUE'
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
|
|
||||||
cargo test
|
cargo test
|
||||||
|
|
||||||
@@ -102,12 +102,12 @@ jobs:
|
|||||||
- run: rustup component add rustfmt
|
- run: rustup component add rustfmt
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
@@ -122,12 +122,12 @@ jobs:
|
|||||||
- run: rustup component add clippy
|
- run: rustup component add clippy
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
cargo clippy -- -D warnings
|
cargo clippy -- -D warnings
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@@ -141,10 +141,10 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
cargo build --release
|
cargo build --release
|
||||||
|
|||||||
+3
-3
@@ -17,7 +17,7 @@ COPY Cargo.toml Cargo.lock ./
|
|||||||
RUN --mount=type=ssh mkdir src && \
|
RUN --mount=type=ssh mkdir src && \
|
||||||
echo "fn main() {println!(\"if you see this, the build broke\")}" > src/main.rs && \
|
echo "fn main() {println!(\"if you see this, the build broke\")}" > src/main.rs && \
|
||||||
cargo build --release --quiet && \
|
cargo build --release --quiet && \
|
||||||
rm -rf src target/release/deps/textsender_auth*
|
rm -rf src target/release/deps/schedtxt_auth*
|
||||||
|
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
COPY .env ./.env
|
COPY .env ./.env
|
||||||
@@ -33,7 +33,7 @@ RUN apt-get update && apt-get install -y ca-certificates libssl-dev libssl3 && r
|
|||||||
|
|
||||||
WORKDIR /usr/local/bin
|
WORKDIR /usr/local/bin
|
||||||
|
|
||||||
COPY --from=builder /usr/src/app/target/release/textsender_auth .
|
COPY --from=builder /usr/src/app/target/release/schedtxt_auth .
|
||||||
|
|
||||||
COPY --from=builder /usr/src/app/.env .
|
COPY --from=builder /usr/src/app/.env .
|
||||||
COPY --from=builder /usr/src/app/migrations ./migrations
|
COPY --from=builder /usr/src/app/migrations ./migrations
|
||||||
@@ -41,4 +41,4 @@ COPY --from=builder /usr/src/app/migrations ./migrations
|
|||||||
EXPOSE 9080
|
EXPOSE 9080
|
||||||
|
|
||||||
# Set the command to run your application
|
# Set the command to run your application
|
||||||
CMD ["./textsender_auth"]
|
CMD ["./schedtxt_auth"]
|
||||||
|
|||||||
+4
-4
@@ -5,7 +5,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
ssh: ["default"]
|
ssh: ["default"]
|
||||||
container_name: textsender_auth
|
container_name: schedtxt_auth
|
||||||
ports:
|
ports:
|
||||||
- "9080:9080"
|
- "9080:9080"
|
||||||
env_file:
|
env_file:
|
||||||
@@ -18,11 +18,11 @@ services:
|
|||||||
# PostgreSQL Database Service
|
# PostgreSQL Database Service
|
||||||
auth_db:
|
auth_db:
|
||||||
image: postgres:18.4-alpine
|
image: postgres:18.4-alpine
|
||||||
container_name: textsender_auth_db
|
container_name: schedtxt_auth_db
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: ${DB_AUTH_USER:-textsender_op}
|
POSTGRES_USER: ${DB_AUTH_USER:-schedtxt_op}
|
||||||
POSTGRES_PASSWORD: ${DB_AUTH_PASSWORD:-password}
|
POSTGRES_PASSWORD: ${DB_AUTH_PASSWORD:-password}
|
||||||
POSTGRES_DB: ${DB_AUTH_NAME:-textsender_auth_db}
|
POSTGRES_DB: ${DB_AUTH_NAME:-schedtxt_auth_db}
|
||||||
volumes:
|
volumes:
|
||||||
# Persist database data using a named volume
|
# Persist database data using a named volume
|
||||||
- postgres_data:/var/lib/postgresql
|
- postgres_data:/var/lib/postgresql
|
||||||
|
|||||||
+6
-6
@@ -1,7 +1,7 @@
|
|||||||
use textsender_auth;
|
use schedtxt_auth;
|
||||||
use textsender_auth::callers;
|
use schedtxt_auth::callers;
|
||||||
use textsender_auth::db;
|
use schedtxt_auth::db;
|
||||||
use textsender_auth::init;
|
use schedtxt_auth::init;
|
||||||
|
|
||||||
mod db_mgr {
|
mod db_mgr {
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
@@ -231,7 +231,7 @@ pub mod requests {
|
|||||||
user_id: &uuid::Uuid,
|
user_id: &uuid::Uuid,
|
||||||
) -> Result<axum::response::Response, axum::http::Error> {
|
) -> Result<axum::response::Response, axum::http::Error> {
|
||||||
let url = super::util::format_url_with_value(
|
let url = super::util::format_url_with_value(
|
||||||
textsender_auth::callers::endpoints::GET_USER_PROFILE,
|
schedtxt_auth::callers::endpoints::GET_USER_PROFILE,
|
||||||
user_id,
|
user_id,
|
||||||
);
|
);
|
||||||
match axum::http::Request::builder()
|
match axum::http::Request::builder()
|
||||||
@@ -1063,7 +1063,7 @@ async fn test_get_user_profile() {
|
|||||||
match requests::get_user_profile(&app, &user_id).await {
|
match requests::get_user_profile(&app, &user_id).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
match util::convert_response::<
|
match util::convert_response::<
|
||||||
textsender_auth::callers::login::response::GetUserProfileResponse,
|
schedtxt_auth::callers::login::response::GetUserProfileResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user