Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77d1585ed5 | ||
|
|
e03eae219d | ||
|
|
35bb116bfd |
18
.drone.yml
18
.drone.yml
@ -424,7 +424,7 @@ steps:
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
- name: telegram-listener-build-push
|
||||
image: gcr.io/kaniko-project/executor:v1.23.2-debug
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
environment:
|
||||
HUB_USERNAME:
|
||||
from_secret: hub_username
|
||||
@ -439,7 +439,6 @@ steps:
|
||||
- |
|
||||
/kaniko/executor \
|
||||
--context=. \
|
||||
--build-context=rootconfig=. \
|
||||
--dockerfile=src/Nocr.TelegramListener.Host/Dockerfile \
|
||||
--destination=hub.musk.fun/k8s/nocr/telegram_listener:${DRONE_COMMIT_SHA:0:7} \
|
||||
--destination=hub.musk.fun/k8s/nocr/telegram_listener:${DRONE_TAG} \
|
||||
@ -451,7 +450,7 @@ steps:
|
||||
- users-nuget
|
||||
|
||||
- name: telegram-client-build-push
|
||||
image: gcr.io/kaniko-project/executor:v1.23.2-debug
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
environment:
|
||||
HUB_USERNAME:
|
||||
from_secret: hub_username
|
||||
@ -466,7 +465,6 @@ steps:
|
||||
- |
|
||||
/kaniko/executor \
|
||||
--context=. \
|
||||
--build-context=rootconfig=. \
|
||||
--dockerfile=src/Nocr.TelegramClient.Host/Dockerfile \
|
||||
--destination=hub.musk.fun/k8s/nocr/telegram_client:${DRONE_COMMIT_SHA:0:7} \
|
||||
--destination=hub.musk.fun/k8s/nocr/telegram_client:${DRONE_TAG} \
|
||||
@ -478,7 +476,7 @@ steps:
|
||||
- telegram-listener-build-push
|
||||
|
||||
- name: text-matcher-build-push
|
||||
image: gcr.io/kaniko-project/executor:v1.23.2-debug
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
environment:
|
||||
HUB_USERNAME:
|
||||
from_secret: hub_username
|
||||
@ -493,7 +491,6 @@ steps:
|
||||
- |
|
||||
/kaniko/executor \
|
||||
--context=. \
|
||||
--build-context=rootconfig=. \
|
||||
--dockerfile=src/Nocr.TextMatcher.Host/Dockerfile \
|
||||
--destination=hub.musk.fun/k8s/nocr/text_matcher:${DRONE_COMMIT_SHA:0:7} \
|
||||
--destination=hub.musk.fun/k8s/nocr/text_matcher:${DRONE_TAG} \
|
||||
@ -505,7 +502,7 @@ steps:
|
||||
- telegram-client-build-push
|
||||
|
||||
- name: text-matcher-migrator-build-push
|
||||
image: gcr.io/kaniko-project/executor:v1.23.2-debug
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
environment:
|
||||
HUB_USERNAME:
|
||||
from_secret: hub_username
|
||||
@ -520,7 +517,6 @@ steps:
|
||||
- |
|
||||
/kaniko/executor \
|
||||
--context=. \
|
||||
--build-context=rootconfig=. \
|
||||
--dockerfile=src/Nocr.TextMatcher.Migrator/Dockerfile \
|
||||
--destination=hub.musk.fun/k8s/nocr/text_matcher_migrator:${DRONE_COMMIT_SHA:0:7} \
|
||||
--destination=hub.musk.fun/k8s/nocr/text_matcher_migrator:${DRONE_TAG} \
|
||||
@ -532,7 +528,7 @@ steps:
|
||||
- text-matcher-build-push
|
||||
|
||||
- name: users-build-push
|
||||
image: gcr.io/kaniko-project/executor:v1.23.2-debug
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
environment:
|
||||
HUB_USERNAME:
|
||||
from_secret: hub_username
|
||||
@ -547,7 +543,6 @@ steps:
|
||||
- |
|
||||
/kaniko/executor \
|
||||
--context=. \
|
||||
--build-context=rootconfig=. \
|
||||
--dockerfile=src/Nocr.Users.Host/Dockerfile \
|
||||
--destination=hub.musk.fun/k8s/nocr/users:${DRONE_COMMIT_SHA:0:7} \
|
||||
--destination=hub.musk.fun/k8s/nocr/users:${DRONE_TAG} \
|
||||
@ -559,7 +554,7 @@ steps:
|
||||
- text-matcher-migrator-build-push
|
||||
|
||||
- name: users-migrator-build-push
|
||||
image: gcr.io/kaniko-project/executor:v1.23.2-debug
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
environment:
|
||||
HUB_USERNAME:
|
||||
from_secret: hub_username
|
||||
@ -574,7 +569,6 @@ steps:
|
||||
- |
|
||||
/kaniko/executor \
|
||||
--context=. \
|
||||
--build-context=rootconfig=. \
|
||||
--dockerfile=src/Nocr.Users.Migrator/Dockerfile \
|
||||
--destination=hub.musk.fun/k8s/nocr/users_migrator:${DRONE_COMMIT_SHA:0:7} \
|
||||
--destination=hub.musk.fun/k8s/nocr/users_migrator:${DRONE_TAG} \
|
||||
|
||||
@ -45,16 +45,21 @@ Each service follows Clean Architecture with separate projects for:
|
||||
|
||||
### Running the System
|
||||
```bash
|
||||
# IMPORTANT: Before building with Docker Compose, prepare the build environment
|
||||
./prepare-build.sh
|
||||
|
||||
# Start all services with Docker Compose
|
||||
docker-compose up
|
||||
|
||||
# Start individual services for development
|
||||
# Start individual services for development (no preparation needed)
|
||||
cd telegram-client && dotnet run --project src/Nocr.TelegramClient.Host
|
||||
cd telegram-listener && dotnet run --project src/Nocr.TelegramListener.Host
|
||||
cd telegram-listener && dotnet run --project src/Nocr.TelegramListener.Host
|
||||
cd text-matcher && dotnet run --project src/Nocr.TextMatcher.Host
|
||||
cd users && dotnet run --project src/Nocr.Users.Host
|
||||
```
|
||||
|
||||
**Note:** The `prepare-build.sh` script copies `nuget.config` to all submodule roots, which is required for Docker builds. This step is automatic in CI/CD but must be run manually for local Docker Compose builds.
|
||||
|
||||
### Building
|
||||
```bash
|
||||
# Build individual services
|
||||
|
||||
@ -5,8 +5,6 @@ services:
|
||||
build:
|
||||
context: telegram-client
|
||||
dockerfile: src/Nocr.TelegramClient.Host/Dockerfile
|
||||
additional_contexts:
|
||||
rootconfig: .
|
||||
ports:
|
||||
- 5050:8080
|
||||
# IMPORTANT: Create .nocr.env file in project root with your secrets
|
||||
@ -31,8 +29,6 @@ services:
|
||||
build:
|
||||
context: telegram-listener
|
||||
dockerfile: src/Nocr.TelegramListener.Host/Dockerfile
|
||||
additional_contexts:
|
||||
rootconfig: .
|
||||
ports:
|
||||
- 5040:8080
|
||||
# IMPORTANT: Create .nocr.env file in project root with your secrets
|
||||
@ -59,8 +55,6 @@ services:
|
||||
build:
|
||||
context: text-matcher
|
||||
dockerfile: src/Nocr.TextMatcher.Host/Dockerfile
|
||||
additional_contexts:
|
||||
rootconfig: .
|
||||
ports:
|
||||
- 5041:8080
|
||||
# IMPORTANT: Create .nocr.env file in project root with your secrets
|
||||
@ -86,8 +80,6 @@ services:
|
||||
build:
|
||||
context: text-matcher
|
||||
dockerfile: src/Nocr.TextMatcher.Migrator/Dockerfile
|
||||
additional_contexts:
|
||||
rootconfig: .
|
||||
image: nocr-text-matcher-migrations:latest
|
||||
container_name: nocr-text-matcher-migrator
|
||||
environment:
|
||||
@ -102,8 +94,6 @@ services:
|
||||
build:
|
||||
context: users
|
||||
dockerfile: src/Nocr.Users.Host/Dockerfile
|
||||
additional_contexts:
|
||||
rootconfig: .
|
||||
ports:
|
||||
- 5042:8080
|
||||
# IMPORTANT: Create .nocr.env file in project root with your secrets
|
||||
@ -127,8 +117,6 @@ services:
|
||||
build:
|
||||
context: users
|
||||
dockerfile: src/Nocr.Users.Migrator/Dockerfile
|
||||
additional_contexts:
|
||||
rootconfig: .
|
||||
image: nocr-users-migrator:latest
|
||||
container_name: nocr-users-migrator
|
||||
environment:
|
||||
|
||||
16
prepare-build.sh
Executable file
16
prepare-build.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
# Prepares the build environment by copying nuget.config to all submodules
|
||||
# This is required for both local docker-compose builds and CI/CD
|
||||
|
||||
set -e
|
||||
|
||||
echo "📦 Copying nuget.config to all submodules..."
|
||||
|
||||
for submodule in telegram-client telegram-listener text-matcher users; do
|
||||
if [ -d "$submodule" ]; then
|
||||
cp nuget.config "$submodule/"
|
||||
echo "✓ Copied to $submodule/"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "✅ Build preparation complete!"
|
||||
@ -1 +1 @@
|
||||
Subproject commit c6f9c92eac786b47eaf0c6c5109fd216731648e0
|
||||
Subproject commit e8ee01cbe809867305ff02611155cddffccbb401
|
||||
@ -1 +1 @@
|
||||
Subproject commit a31068d63e9c12d87fa04399c7bdbb2938390eea
|
||||
Subproject commit 9ad504753550414edd96ef4194a3e0ee7e604e28
|
||||
@ -1 +1 @@
|
||||
Subproject commit 3cf29a5aa1a54879c54200cb358c5bdbf41847f4
|
||||
Subproject commit 1a55061e4b1b125d1b911f479fc830fb94cd93cc
|
||||
2
users
2
users
@ -1 +1 @@
|
||||
Subproject commit f692e329256d022377adaccbc72c53b393f2a29f
|
||||
Subproject commit 30ae0c043ca2f8958223d6fb343b8b3e3561d727
|
||||
Loading…
Reference in New Issue
Block a user