kompress eshop rename from gitara
This commit is contained in:
@@ -2,7 +2,7 @@ CONTAINER_NAME=universal-web
|
|||||||
REVERSE_PROXY_NETWORK=
|
REVERSE_PROXY_NETWORK=
|
||||||
UPLOADS_VOLUME_NAME=universal_web_uploads
|
UPLOADS_VOLUME_NAME=universal_web_uploads
|
||||||
|
|
||||||
APP_HOST=https://gitara.farmeris.sk
|
APP_HOST=https://eshop.example.com
|
||||||
PORT=5150
|
PORT=5150
|
||||||
SERVER_BINDING=0.0.0.0
|
SERVER_BINDING=0.0.0.0
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
gitara.farmeris.sk {
|
eshop.example.com {
|
||||||
encode gzip
|
encode gzip
|
||||||
|
|
||||||
@static path /static/*
|
@static path /static/*
|
||||||
@@ -6,9 +6,9 @@ gitara.farmeris.sk {
|
|||||||
|
|
||||||
rewrite /favicon.ico /static/favicon/favicon.ico
|
rewrite /favicon.ico /static/favicon/favicon.ico
|
||||||
|
|
||||||
reverse_proxy gitara-web:5150
|
reverse_proxy kompress:5150
|
||||||
}
|
}
|
||||||
|
|
||||||
www.gitara.farmeris.sk {
|
eshop.example.com {
|
||||||
redir https://gitara.farmeris.sk{uri} permanent
|
redir https://eshop.example.com{uri} permanent
|
||||||
}
|
}
|
||||||
|
|||||||
60
Cargo.lock
generated
60
Cargo.lock
generated
@@ -1523,36 +1523,6 @@ dependencies = [
|
|||||||
"wasip3",
|
"wasip3",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "gitara_web"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"async-trait",
|
|
||||||
"axum",
|
|
||||||
"axum-extra",
|
|
||||||
"bytes",
|
|
||||||
"chrono",
|
|
||||||
"dotenvy",
|
|
||||||
"fluent-templates",
|
|
||||||
"include_dir",
|
|
||||||
"insta",
|
|
||||||
"loco-rs",
|
|
||||||
"migration",
|
|
||||||
"regex",
|
|
||||||
"rstest",
|
|
||||||
"sea-orm",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"serial_test",
|
|
||||||
"time",
|
|
||||||
"tokio",
|
|
||||||
"tracing",
|
|
||||||
"tracing-subscriber",
|
|
||||||
"unic-langid",
|
|
||||||
"uuid",
|
|
||||||
"validator",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "glob"
|
name = "glob"
|
||||||
version = "0.3.3"
|
version = "0.3.3"
|
||||||
@@ -2124,6 +2094,36 @@ dependencies = [
|
|||||||
"simple_asn1",
|
"simple_asn1",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "kompress_eshop"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"async-trait",
|
||||||
|
"axum",
|
||||||
|
"axum-extra",
|
||||||
|
"bytes",
|
||||||
|
"chrono",
|
||||||
|
"dotenvy",
|
||||||
|
"fluent-templates",
|
||||||
|
"include_dir",
|
||||||
|
"insta",
|
||||||
|
"loco-rs",
|
||||||
|
"migration",
|
||||||
|
"regex",
|
||||||
|
"rstest",
|
||||||
|
"sea-orm",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"serial_test",
|
||||||
|
"time",
|
||||||
|
"tokio",
|
||||||
|
"tracing",
|
||||||
|
"tracing-subscriber",
|
||||||
|
"unic-langid",
|
||||||
|
"uuid",
|
||||||
|
"validator",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kqueue"
|
name = "kqueue"
|
||||||
version = "1.1.1"
|
version = "1.1.1"
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "gitara_web"
|
name = "kompress_eshop"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
default-run = "gitara_web-cli"
|
default-run = "kompress-eshop-cli"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ axum-extra = { version = "0.10", features = ["form"] }
|
|||||||
bytes = { version = "1" }
|
bytes = { version = "1" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "gitara_web-cli"
|
name = "kompress-eshop-cli"
|
||||||
path = "src/bin/main.rs"
|
path = "src/bin/main.rs"
|
||||||
required-features = []
|
required-features = []
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ WORKDIR /usr/src
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN cargo build --release --bin gitara_web-cli
|
RUN cargo build --release --bin kompress-cli
|
||||||
|
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
@@ -17,9 +17,9 @@ WORKDIR /usr/app
|
|||||||
|
|
||||||
COPY --from=builder /usr/src/assets assets
|
COPY --from=builder /usr/src/assets assets
|
||||||
COPY --from=builder /usr/src/config config
|
COPY --from=builder /usr/src/config config
|
||||||
COPY --from=builder /usr/src/target/release/gitara_web-cli gitara_web-cli
|
COPY --from=builder /usr/src/target/release/kompress-cli kompress-cli
|
||||||
|
|
||||||
ENV LOCO_ENV=production
|
ENV LOCO_ENV=production
|
||||||
EXPOSE 5150
|
EXPOSE 5150
|
||||||
ENTRYPOINT ["/usr/app/gitara_web-cli"]
|
ENTRYPOINT ["/usr/app/kompress-cli"]
|
||||||
CMD ["start"]
|
CMD ["start"]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
brand = My guitar
|
brand = Kompress eshop
|
||||||
hello-world = Hello world!
|
hello-world = Hello world!
|
||||||
meta-description = A guitar player's personal site. News, blog posts, albums, and songs in one place.
|
meta-description = Kompress eshop
|
||||||
nav-home = Home
|
nav-home = Home
|
||||||
nav-about = About
|
nav-about = About
|
||||||
nav-blog = Blog
|
nav-blog = Blog
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
brand = My guitar
|
brand = Kompress eshop
|
||||||
hello-world = Hello world!
|
hello-world = Hello world!
|
||||||
meta-description = A guitar player's personal site. News, blog posts, albums, and songs in one place.
|
meta-description = Kompress eshop
|
||||||
nav-home = Home
|
nav-home = Home
|
||||||
nav-about = About
|
nav-about = About
|
||||||
nav-blog = Blog
|
nav-blog = Blog
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
brand = Moja gitara
|
brand = Kompress eshop
|
||||||
hello-world = Ahoj svet!
|
hello-world = Ahoj svet!
|
||||||
meta-description = Osobná stránka gitaristu. Novinky, blog, albumy a skladby na jednom mieste.
|
meta-description = Kompress eshop
|
||||||
nav-home = Domov
|
nav-home = Domov
|
||||||
nav-about = O mne
|
nav-about = O mne
|
||||||
nav-blog = Blog
|
nav-blog = Blog
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ mailer:
|
|||||||
# Database Configuration
|
# Database Configuration
|
||||||
database:
|
database:
|
||||||
# Database connection URI
|
# Database connection URI
|
||||||
uri: {{ get_env(name="DATABASE_URL", default="postgres://uni_loco_web_user:3@localhost:5432/gitara_web_development") }}
|
uri: {{ get_env(name="DATABASE_URL", default="postgres://uni_loco_web_user:3@localhost:5432/kompress_eshop_development") }}
|
||||||
# When enabled, the sql query will be logged.
|
# When enabled, the sql query will be logged.
|
||||||
enable_logging: false
|
enable_logging: false
|
||||||
# Set the timeout duration when acquiring a connection.
|
# Set the timeout duration when acquiring a connection.
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ mailer:
|
|||||||
# Database Configuration
|
# Database Configuration
|
||||||
database:
|
database:
|
||||||
# Database connection URI
|
# Database connection URI
|
||||||
uri: {{ get_env(name="DATABASE_URL", default="postgres://uni_loco_web_user:3@localhost:5432/gitara_web_test") }}
|
uri: {{ get_env(name="DATABASE_URL", default="postgres://uni_loco_web_user:3@localhost:5432/kompress_eshop_test") }}
|
||||||
# When enabled, the sql query will be logged.
|
# When enabled, the sql query will be logged.
|
||||||
enable_logging: false
|
enable_logging: false
|
||||||
# Set the timeout duration when acquiring a connection.
|
# Set the timeout duration when acquiring a connection.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
gitara-web:
|
kompress:
|
||||||
container_name: gitara-web
|
container_name: kompress
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@@ -9,9 +9,9 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- .env.production
|
- .env.production
|
||||||
volumes:
|
volumes:
|
||||||
- gitara_web_data:/usr/app/data
|
- kompress_eshop_data:/usr/app/data
|
||||||
networks:
|
networks:
|
||||||
- gitara-net
|
- kompress_eshop-net
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "curl -fsS http://localhost:5150/_ping"]
|
test: ["CMD-SHELL", "curl -fsS http://localhost:5150/_ping"]
|
||||||
@@ -21,10 +21,10 @@ services:
|
|||||||
start_period: 20s
|
start_period: 20s
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitara-net:
|
kompress_eshop-net:
|
||||||
external: true
|
external: true
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
gitara_web_data:
|
kompress_eshop_data:
|
||||||
external: true
|
external: true
|
||||||
name: gitara_web_data
|
name: kompress_eshop_data
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use loco_rs::{cli::playground, prelude::*};
|
use loco_rs::{cli::playground, prelude::*};
|
||||||
use gitara_web::app::App;
|
use kompress_eshop::app::App;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> loco_rs::Result<()> {
|
async fn main() -> loco_rs::Result<()> {
|
||||||
|
|||||||
12
flake.nix
12
flake.nix
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "Development Nix flake for the gitara_web (kompress_eshop) loco-rs app";
|
description = "Development Nix flake for the kompress (kompress_eshop) loco-rs app";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
@@ -41,8 +41,8 @@
|
|||||||
cargo = pkgs.rust-bin.stable.latest.minimal;
|
cargo = pkgs.rust-bin.stable.latest.minimal;
|
||||||
rustc = pkgs.rust-bin.stable.latest.minimal;
|
rustc = pkgs.rust-bin.stable.latest.minimal;
|
||||||
};
|
};
|
||||||
gitara-web = rustPlatform.buildRustPackage {
|
kompress = rustPlatform.buildRustPackage {
|
||||||
pname = "gitara_web";
|
pname = "kompress_eshop";
|
||||||
inherit version;
|
inherit version;
|
||||||
src = ./.;
|
src = ./.;
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Build only the application binary.
|
# Build only the application binary.
|
||||||
cargoBuildFlags = [ "--bin" "gitara_web-cli" ];
|
cargoBuildFlags = [ "--bin" "kompress-eshop-cli" ];
|
||||||
# Tests need a database/runtime environment; skip during the build.
|
# Tests need a database/runtime environment; skip during the build.
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
@@ -66,8 +66,8 @@
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
gitara-web = gitara-web;
|
kompress = kompress;
|
||||||
default = gitara-web;
|
default = kompress;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use loco_rs::cli;
|
use loco_rs::cli;
|
||||||
use migration::Migrator;
|
use migration::Migrator;
|
||||||
use gitara_web::app::App;
|
use kompress_eshop::app::App;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> loco_rs::Result<()> {
|
async fn main() -> loco_rs::Result<()> {
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
- id: 1
|
- id: 2
|
||||||
pid: 11111111-1111-1111-1111-111111111111
|
pid: 11111111-1111-1111-1111-111111111111
|
||||||
email: user1@example.com
|
email: user1@example.com
|
||||||
password: "$argon2id$v=19$m=19456,t=2,p=1$ETQBx4rTgNAZhSaeYZKOZg$eYTdH26CRT6nUJtacLDEboP0li6xUwUF/q5nSlQ8uuc"
|
password: "$argon2id$v=19$m=19456,t=2,p=1$ETQBx4rTgNAZhSaeYZKOZg$eYTdH26CRT6nUJtacLDEboP0li6xUwUF/q5nSlQ8uuc"
|
||||||
api_key: lo-95ec80d7-cb60-4b70-9b4b-9ef74cb88758
|
api_key: lo-95ec80d7-cb60-4b70-9b4b-9ef74cb88758
|
||||||
name: user1
|
name: user1
|
||||||
|
theme: light
|
||||||
created_at: "2023-11-12T12:34:56.789Z"
|
created_at: "2023-11-12T12:34:56.789Z"
|
||||||
updated_at: "2023-11-12T12:34:56.789Z"
|
updated_at: "2023-11-12T12:34:56.789Z"
|
||||||
- id: 2
|
- id: 3
|
||||||
pid: 22222222-2222-2222-2222-222222222222
|
pid: 22222222-2222-2222-2222-222222222222
|
||||||
email: user2@example.com
|
email: user2@example.com
|
||||||
password: "$argon2id$v=19$m=19456,t=2,p=1$ETQBx4rTgNAZhSaeYZKOZg$eYTdH26CRT6nUJtacLDEboP0li6xUwUF/q5nSlQ8uuc"
|
password: "$argon2id$v=19$m=19456,t=2,p=1$ETQBx4rTgNAZhSaeYZKOZg$eYTdH26CRT6nUJtacLDEboP0li6xUwUF/q5nSlQ8uuc"
|
||||||
api_key: lo-153561ca-fa84-4e1b-813a-c62526d0a77e
|
api_key: lo-153561ca-fa84-4e1b-813a-c62526d0a77e
|
||||||
name: user2
|
name: user2
|
||||||
|
theme: light
|
||||||
created_at: "2023-11-12T12:34:56.789Z"
|
created_at: "2023-11-12T12:34:56.789Z"
|
||||||
updated_at: "2023-11-12T12:34:56.789Z"
|
updated_at: "2023-11-12T12:34:56.789Z"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use gitara_web::app::App;
|
use kompress_eshop::app::App;
|
||||||
use loco_rs::testing::prelude::*;
|
use loco_rs::testing::prelude::*;
|
||||||
use serial_test::serial;
|
use serial_test::serial;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use gitara_web::app::App;
|
use kompress_eshop::app::App;
|
||||||
use loco_rs::testing::prelude::*;
|
use loco_rs::testing::prelude::*;
|
||||||
use serial_test::serial;
|
use serial_test::serial;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use gitara_web::app::App;
|
use kompress_eshop::app::App;
|
||||||
use loco_rs::testing::prelude::*;
|
use loco_rs::testing::prelude::*;
|
||||||
use serial_test::serial;
|
use serial_test::serial;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use gitara_web::app::App;
|
use kompress_eshop::app::App;
|
||||||
use loco_rs::testing::prelude::*;
|
use loco_rs::testing::prelude::*;
|
||||||
use serial_test::serial;
|
use serial_test::serial;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use gitara_web::app::App;
|
use kompress_eshop::app::App;
|
||||||
use loco_rs::testing::prelude::*;
|
use loco_rs::testing::prelude::*;
|
||||||
use serial_test::serial;
|
use serial_test::serial;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use gitara_web::app::App;
|
use kompress_eshop::app::App;
|
||||||
use loco_rs::testing::prelude::*;
|
use loco_rs::testing::prelude::*;
|
||||||
use serial_test::serial;
|
use serial_test::serial;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use gitara_web::app::App;
|
use kompress_eshop::app::App;
|
||||||
use loco_rs::testing::prelude::*;
|
use loco_rs::testing::prelude::*;
|
||||||
use serial_test::serial;
|
use serial_test::serial;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use insta::assert_debug_snapshot;
|
|||||||
use loco_rs::testing::prelude::*;
|
use loco_rs::testing::prelude::*;
|
||||||
use sea_orm::{ActiveModelTrait, ActiveValue, IntoActiveModel};
|
use sea_orm::{ActiveModelTrait, ActiveValue, IntoActiveModel};
|
||||||
use serial_test::serial;
|
use serial_test::serial;
|
||||||
use gitara_web::{
|
use kompress_eshop::{
|
||||||
models::users::{self, Model, RegisterParams},
|
models::users::{self, Model, RegisterParams},
|
||||||
app::App,
|
app::App,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ use insta::{assert_debug_snapshot, with_settings};
|
|||||||
use loco_rs::testing::prelude::*;
|
use loco_rs::testing::prelude::*;
|
||||||
use rstest::rstest;
|
use rstest::rstest;
|
||||||
use serial_test::serial;
|
use serial_test::serial;
|
||||||
use gitara_web::{models::users, app::App};
|
use kompress_eshop::{models::users, app::App};
|
||||||
|
|
||||||
use super::prepare_data;
|
use super::prepare_data;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use axum::http::{HeaderName, HeaderValue};
|
use axum::http::{HeaderName, HeaderValue};
|
||||||
use loco_rs::{app::AppContext, TestServer};
|
use loco_rs::{app::AppContext, TestServer};
|
||||||
use gitara_web::{models::users, views::auth::LoginResponse};
|
use kompress_eshop::{models::users, views::auth::LoginResponse};
|
||||||
|
|
||||||
const USER_EMAIL: &str = "test@loco.com";
|
const USER_EMAIL: &str = "test@loco.com";
|
||||||
const USER_PASSWORD: &str = "1234";
|
const USER_PASSWORD: &str = "1234";
|
||||||
|
|||||||
Reference in New Issue
Block a user