Skip to content

Commit

Permalink
updated to .net 9
Browse files Browse the repository at this point in the history
  • Loading branch information
HaikAsatryan committed Nov 28, 2024
1 parent 1c2e6d2 commit 1f0cb1c
Show file tree
Hide file tree
Showing 102 changed files with 423 additions and 2,037 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -480,4 +480,5 @@ $RECYCLE.BIN/
# Added by me
.idea
logs
LocalFileStorage
LocalFileStorage
*.db*
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
WORKDIR /app
COPY ["./publish/", "./"]
ENTRYPOINT ["dotnet", "Pandatech.VerticalSlices.dll"]
4 changes: 2 additions & 2 deletions Dockerfile.Local
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
USER $APP_UID
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /build
COPY ["Directory.Build.props", "."]
Expand Down
286 changes: 137 additions & 149 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
version: '3.8'

volumes:
# elasticsearch:
# driver: local
# kibana:
# driver: local
# pgadmin:
# driver: local
rabbitmq:
driver: local
redis:
driver: local
redisinsight:
driver: local
postgres:
driver: local
elasticsearch:
driver: local
kibana:
driver: local
# pgadmin:
# driver: local
# redisinsight:
# driver: local
# oracle_db:
# driver: local


services:
Expand Down Expand Up @@ -44,68 +44,76 @@ services:
volumes:
- ~/.aspnet/https:/https:ro

#####################################################################################

# elasticsearch:
# container_name: pandatech_vertical_slices_elasticsearch
# image: docker.elastic.co/elasticsearch/elasticsearch:8.12.2
# restart: always
# ports:
# - 9200:9200
# environment:
# - bootstrap.memory_lock=true
# - discovery.type=single-node
# - xpack.security.enabled=false
# - xpack.security.http.ssl.enabled=false
# - xpack.security.transport.ssl.enabled=false
# ulimits:
# memlock:
# soft: -1
# hard: -1
# volumes:
# - elasticsearch:/usr/share/elasticsearch/data
# healthcheck:
# test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
# interval: 30s
# timeout: 10s
# retries: 5

#################################################################################

# kibana:
# depends_on:
# elasticsearch:
# condition: service_healthy
# container_name: pandatech_vertical_slices_kibana
# image: docker.elastic.co/kibana/kibana:8.12.2
# restart: always
# ports:
# - 5601:5601
# environment:
# - ELASTICSEARCH_HOSTS=http://elasticsearch:9200
# volumes:
# - kibana:/usr/share/kibana/data

################################a###################################################
# ---------------------------------------------------------------------------------
# Elastic search
# ---------------------------------------------------------------------------------

elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:8.16.1
restart: always
ports:
- 9200:9200
environment:
- bootstrap.memory_lock=true
- discovery.type=single-node
- xpack.security.enabled=false
- xpack.security.http.ssl.enabled=false
- xpack.security.transport.ssl.enabled=false
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- elasticsearch:/usr/share/elasticsearch/data
healthcheck:
test: [ "CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1" ]
interval: 30s
timeout: 10s
retries: 5

# ---------------------------------------------------------------------------------
# Kibana
# ---------------------------------------------------------------------------------

kibana:
depends_on:
elasticsearch:
condition: service_healthy
container_name: kibana
image: docker.elastic.co/kibana/kibana:8.16.1
restart: always
ports:
- 5601:5601
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
volumes:
- kibana:/usr/share/kibana/data

# ---------------------------------------------------------------------------------
# PgAdmin
# ---------------------------------------------------------------------------------

# pg-admin:
# container_name: pandatech_vertical_slices_pg_admin
# image: dpage/pgadmin4:8.4
# container_name: pg_admin
# image: dpage/pgadmin4:latest
# restart: always
# ports:
# - "5050:80"
# #in pgAdmin set Host name/address to host.docker.internal
# #in pgAdmin set Host name/address to host.docker.internal or postgres_db in linux
# environment:
# - PGADMIN_DEFAULT_EMAIL=test@pandatech.it
# - PGADMIN_DEFAULT_PASSWORD=test
# volumes:
# - pgadmin:/var/lib/pgadmin

###################################################################################


# ---------------------------------------------------------------------------------
# RabbitMQ
# ---------------------------------------------------------------------------------

rabbitmq:
container_name: pandatech_vertical_slices_rabbitmq
image: rabbitmq:3.13.0-management-alpine
container_name: rabbitmq
image: rabbitmq:4-management-alpine
restart: always
ports:
- "5672:5672"
Expand All @@ -115,34 +123,40 @@ services:
RABBITMQ_DEFAULT_PASS: test
volumes:
- rabbitmq:/var/lib/rabbitmq

###################################################################################


# ---------------------------------------------------------------------------------
# Redis
# ---------------------------------------------------------------------------------

redis:
container_name: pandatech_vertical_slices_redis
image: redis:7.2.4
container_name: redis
image: redis:latest
restart: always
ports:
- "6379:6379"
volumes:
- redis:/data

###################################################################################

redisinsight:
container_name: pandatech_vertical_slices_redisinsight
image: redislabs/redisinsight:1.14.0
restart: always
ports:
- "8001:8001"
volumes:
- redisinsight:/db

###################################################################################


# ---------------------------------------------------------------------------------
# Redis Insight
# ---------------------------------------------------------------------------------

# redisinsight:
# container_name: redisinsight
# image: redis/redisinsight:latest
# restart: always
# ports:
# - "5540:5540"
# volumes:
# - redisinsight:/db

# ---------------------------------------------------------------------------------
# Postgres
# ---------------------------------------------------------------------------------

postgres_db:
container_name: pandatech_vertical_slices_postgres
image: postgres:16.2
container_name: postgres
image: postgres:latest
restart: always
environment:
- POSTGRES_USER=test
Expand All @@ -151,70 +165,44 @@ services:
- "5432:5432"
volumes:
- postgres:/var/lib/postgresql/data

#Check optimal configurations with PandaPostgres
command:
- "-c"
- "log_connections=on"
- "-c"
- "log_disconnections=on"
- "-c"
- "log_duration=on"
- "-c"
- "log_line_prefix=%m [%p-%l] %u@%d app=%a "
- "-c"
- "log_lock_waits=on"
- "-c"
- "log_min_duration_statement=1s"
- "-c"
- "log_statement=all"
- "-c"
- "log_timezone=Asia/Yerevan"
- "-c"
- "log_temp_files=0"
- "-c"
- "shared_preload_libraries=pg_stat_statements"
- "-c"
- "track_commit_timestamp=on"
- "-c"
- "track_functions=pl"
- "-c"
- "track_io_timing=on"
- "-c"
- "hot_standby_feedback=on"
- "-c"
- "TimeZone=Asia/Yerevan"
- "-c"
- "effective_io_concurrency=200"
- "-c"
- "cpu_tuple_cost=0.03"
- "-c"
- "random_page_cost=1.1"
- "-c"
- "max_connections=24"
- "-c"
- "idle_in_transaction_session_timeout=5min"
- "-c"
- "max_locks_per_transaction=128"
- "-c"
- "synchronous_commit=off"
- "-c"
- "default_transaction_read_only=off"
- "-c"
- "transaction_read_only=off"
- "-c"
- "archive_mode=on"
- "-c"
- "checkpoint_timeout=15min"
- "-c"
- "checkpoint_completion_target=0.9"
- "-c"
- "max_wal_senders=64"
- "-c"
- "wal_buffers=-1"
- "-c"
- "wal_compression=on"
- "-c"
- "wal_level=logical"
- "-c"
- "wal_log_hints=on"

# ---------------------------------------------------------------------------------
# Oracle
# ---------------------------------------------------------------------------------

# oracle_db:
# container_name: oracle-free
# image: container-registry.oracle.com/database/free:latest
# restart: always
# ports:
# - "1521:1521"
# - "5500:5500"
# environment:
# - ORACLE_PWD=test
# volumes:
# - oracle_db:/opt/oracle/oradata

# ---------------------------------------------------------------------------------
# Some .Net application
# ---------------------------------------------------------------------------------

# pandawebapi:
# build:
# context: .
# dockerfile: Dockerfile.Local
# container_name: dotnet_application
# hostname: pandawebapi
# restart: always
# ports:
# - "80:80" # Change the ports as necessary for your application
# depends_on:
# - postgres_db
# - rabbitmq
# - redis
# - elasticsearch
# environment:
# - ASPNETCORE_ENVIRONMENT=Local
# - PANDAVAULT_URL=https://bevault.pandatech.it
# - PANDAVAULT_SECRET=0c579832-968e-463e-a69e-f9634332d29e
# volumes:
# - ~/.aspnet/https:/https:ro
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.200",
"rollForward": "latestMajor"
"version": "9.0.100",
"rollForward": "latestMinor"
}
}
2 changes: 1 addition & 1 deletion src/Pandatech.VerticalSlices/AssemblyReference.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
namespace Pandatech.VerticalSlices;

public record AssemblyReference();
public record AssemblyReference;
Loading

0 comments on commit 1f0cb1c

Please sign in to comment.