Skip to content

Commit

Permalink
Implement prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
TheByronHimes committed Mar 6, 2024
1 parent 44b92a4 commit cd1e98c
Show file tree
Hide file tree
Showing 50 changed files with 2,250 additions and 1,593 deletions.
13 changes: 10 additions & 3 deletions .devcontainer/.dev_config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Please only mention the non-default settings here:

language: Greek
service_instance_id: "1"
central_data_steward_email: "test@test.abc"
db_connection_str: mongodb://localhost:27017
db_name: users
kafka_servers: ["kafka:9092"]
access_request_events_topic: "access_request_events"
access_request_created_type: "access_request_created"
access_request_allowed_type: "access_request_allowed"
access_request_denied_type: "access_request_denied"
notification_event_type: "notification"
notification_event_topic: "notification_events"
3 changes: 1 addition & 2 deletions .devcontainer/dev_launcher
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/bash

# adapt to package name
my-microservice
nos
24 changes: 2 additions & 22 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
INSTALL_NODE: "true"
NODE_VERSION: "lts/*"
# Please adapt to package name:
PACKAGE_NAME: "my_microservice"
PACKAGE_NAME: "nos"
# On Linux, you may need to update USER_UID and USER_GID below if not your local UID is not 1000.
USER_UID: 1000
USER_GID: 1000
Expand All @@ -32,39 +32,19 @@ services:
# define environment variables
environment:
# Please adapt to package name:
MY_MICROSERVICE_CONFIG_YAML: /workspace/.devcontainer/.dev_config.yaml
NOS_CONFIG_YAML: /workspace/.devcontainer/.dev_config.yaml
# Used by db migration:
DB_URL: postgresql://postgres:postgres@postgresql/postgres
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)


# Please remove service dependencies that are not needed:
mongodb:
image: mongo:latest
restart: unless-stopped
volumes:
- mongo_fs:/data/db

localstack:
image: localstack/localstack
environment:
SERVICES: s3
DEFAULT_REGION: eu-west-1
AWS_DEFAULT_REGION: eu-west-1
# accessible at localhost
HOSTNAME_EXTERNAL: localhost
USE_SSL: "false"
DATA_DIR: /var/lib/localstack/data
DEBUG: 1
volumes:
- type: volume
source: s3_fs
target: /var/lib/localstack
volume:
nocopy: true
# useful ports: 4566 - AWS API

volumes:
s3_fs: {}
mongo_fs: {}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ repos:
- id: no-commit-to-branch
args: [--branch, dev, --branch, int, --branch, main]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.11
rev: v0.3.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
16 changes: 7 additions & 9 deletions .pyproject_generation/pyproject_custom.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
[project]
# please adapt to package name
name = "my_microservice"
name = "nos"
version = "0.1.0"
description = "My-Microservice - a short description"
description = "The Notification Orchestration Service controls the creation of notification events."
dependencies = [
"typer >= 0.9.0",
"ghga-service-commons[api] >= 1.2.0",
"ghga-event-schemas >= 1.0.0",
"hexkit[akafka,s3,mongodb] >= 1.1.0"
"ghga-service-commons[api] >= 3.0.0",
"ghga-event-schemas >= 3.0.0",
"hexkit[akafka,s3,mongodb] >= 2.1.0"
]

[project.urls]
# please adapt to package name
Repository = "https://github.com/ghga-de/my-microservice"
Repository = "https://github.com/ghga-de/notification-orchestration-service"

[project.scripts]
# please adapt to package name
my-microservice = "my_microservice.__main__:run"
nos = "nos.__main__:run"
1 change: 1 addition & 0 deletions .template/mandatory_files_ignore.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Optional list of files which are actually mandatory in the template
# but are allowed to be removed in the current repository
scripts/script_utils/fastapi_app_location.py
1 change: 1 addition & 0 deletions .template/static_files_ignore.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Optional list of files which are actually static in the template
# but are allowed to have different content in the current repository
scripts/update_openapi_docs.py
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ USER appuser
# set environment
ENV PYTHONUNBUFFERED=1
# Please adapt to package name:
ENTRYPOINT ["my-microservice"]
ENTRYPOINT ["nos"]
Loading

0 comments on commit cd1e98c

Please sign in to comment.