Skip to content

Commit

Permalink
Merge pull request #20 from KomodoPlatform/rename-project
Browse files Browse the repository at this point in the history
rename the project
  • Loading branch information
onur-ozkan authored Jan 15, 2024
2 parents bab7877 + 0b8c0ae commit b651c42
Show file tree
Hide file tree
Showing 17 changed files with 49 additions and 55 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: atomicdex-gui-auth pipelines
name: komodo-defi-proxy pipelines
on:
push:
branches:
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
context: .
file: ./Containerfile
push: true
tags: komodoofficial/atomicdex-gui-auth:stable
tags: komodoofficial/komodo-defi-proxy:stable

deployment-commitment:
needs: container-build-and-push
Expand All @@ -178,13 +178,13 @@ jobs:
- name: commitment step
run: |
git clone git@github.com:KomodoPlatform/atomicdex-deployments.git
if [ -d "atomicdex-deployments/atomicdex-gui-auth" ]; then
cd atomicdex-deployments/atomicdex-gui-auth
if [ -d "atomicdex-deployments/komodo-defi-proxy" ]; then
cd atomicdex-deployments/komodo-defi-proxy
sed -i "1s/^.*$/${GITHUB_SHA::9}/" .commit
git config --global user.email "linuxci@komodoplatform.com"
git config --global user.name "linuxci"
git add .commit
git commit -m "[atomicdex-gui-auth] ${GITHUB_SHA::9} is committed for git & container registry"
git commit -m "[komodo-defi-proxy] ${GITHUB_SHA::9} is committed for git & container registry"
git push
fi
41 changes: 36 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
[workspace]
members = [
"main",
]
[package]
name = "main"
version = "0.1.0"
edition = "2021"
publish = false

resolver = "2"
[[bin]]
name = "atomicdex-auth"
path = "src/main.rs"

[dependencies]
async-trait = "0.1.53"
bytes = "1.1.0"
ethereum-types = { version = "0.4", default-features = false, features = ["std", "serialize"] }
futures-util = "0.3.21"
hyper = { version = "0.14.18", default-features = false, features = ["server", "http1", "http2", "tcp", "client"] }
hyper-tls = "0.5.0"
jsonwebtoken = "8.1.0"
log = "0.4.17"
once_cell = "1.12.0"
redis = { version = "0.21.5", default-features = false, features = ["tokio-comp"] }
serde = "1.0.137"
serde_json = "1.0.81"
sha3 = "0.9"
simple_logger = "2.1.0"
tokio = { version = "1.12.0", default-features = false, features = ["macros", "rt-multi-thread", "sync", "time"] }
tokio-tungstenite = { version = "0.20.0", features = ["native-tls"] }
# From our sources
bitcrypto = { git = "https://github.com/KomodoPlatform/atomicDEX-API", branch = "dev" }
ethkey = { git = "https://github.com/artemii235/parity-ethereum.git" }
serialization = { git = "https://github.com/KomodoPlatform/atomicDEX-API", branch = "dev" }

[target.x86_64-unknown-linux-gnu.dependencies]
jemallocator = "0.5.0"

[dev-dependencies]
hex = "0.4.3"
4 changes: 2 additions & 2 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Compilation
FROM docker.io/library/debian:bullseye-slim as build
WORKDIR /usr/src/atomicdex-gui-auth
WORKDIR /usr/src/komodo-defi-proxy

## Install Rust
RUN apt-get update \
Expand All @@ -25,7 +25,7 @@ RUN apt-get update \
RUN update-ca-certificates

## Get binary
COPY --from=build /usr/src/atomicdex-gui-auth/target/release/atomicdex-auth /usr/local/bin/
COPY --from=build /usr/src/komodo-defi-proxy/target/release/atomicdex-auth /usr/local/bin/

## Init command
CMD ["atomicdex-auth"]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ define container-tool
$(if $(_IF_PODMAN), podman, docker)
endef

IMAGE_TAG = atomicdex-gui-auth
CONTAINER_NAME = atomicdex-gui-auth
IMAGE_TAG = komodo-defi-proxy
CONTAINER_NAME = komodo-defi-proxy

container-build:
@echo Building production image
Expand Down
37 changes: 0 additions & 37 deletions main/Cargo.toml

This file was deleted.

2 changes: 1 addition & 1 deletion main/src/ctx.rs → src/ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ fn test_app_config_serialzation_and_deserialization() {

#[test]
fn test_from_fs() {
env::set_var("AUTH_APP_CONFIG_PATH", "../assets/.config_test");
env::set_var("AUTH_APP_CONFIG_PATH", "./assets/.config_test");

let actual = AppConfig::from_fs().unwrap();
let expected = get_app_config_test_instance();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions main/src/security/jwt.rs → src/security/jwt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ fn test_jwt_claims_serialzation_and_deserialization() {

#[tokio::test]
async fn test_read_file_buffer() {
let bytes = read_file_buffer("../assets/.io_test");
let bytes = read_file_buffer("./assets/.io_test");

#[cfg(not(target_os = "windows"))]
assert_eq!(
Expand Down Expand Up @@ -193,8 +193,8 @@ async fn test_read_file_buffer() {
#[tokio::test]
async fn test_generate_jwt() {
let mut cfg = ctx::get_app_config_test_instance();
cfg.privkey_path = String::from("../assets/.privkey_test");
cfg.pubkey_path = String::from("../assets/.pubkey_test");
cfg.privkey_path = String::from("./assets/.privkey_test");
cfg.pubkey_path = String::from("./assets/.pubkey_test");

let buffer = read_file_buffer(&cfg.privkey_path);
AUTH_ENCODING_KEY.get_or_init(|| EncodingKey::from_rsa_pem(&buffer).unwrap());
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b651c42

Please sign in to comment.