An activity interface
This commit is contained in:
parent
e987f215bb
commit
6e2fec1620
30 changed files with 847 additions and 10 deletions
24
contrib/.env-sample
Normal file
24
contrib/.env-sample
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# parametres de déploiement au Makefile
|
||||
|
||||
POSTGRES_HOST=localhost
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_DB=yavsc
|
||||
POSTGRES_USER=yavsc
|
||||
POSTGRES_PASSWORD=<your-password-here>
|
||||
|
||||
HTTP_HOST=localhost
|
||||
|
||||
Org_PORT=83
|
||||
Blogs_PORT=85
|
||||
Api_PORT=87
|
||||
|
||||
PostIt_CLIENT_ID=postit
|
||||
|
||||
ASPNETCORE_Smtp__Host="mercure.pschneider.fr"
|
||||
ASPNETCORE_Smtp__Port=465
|
||||
ASPNETCORE_Smtp__SenderName="Paul Schneider"
|
||||
ASPNETCORE_Smtp__SenderEmail="paul@pschneider.fr"
|
||||
ASPNETCORE_Smtp__UserName="paul"
|
||||
ASPNETCORE_Smtp__Password="<your-smtp-password-here>"
|
||||
|
||||
DESTDIR=/srv/www/yavsc
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
APP_PROJECT_NAMES=Org Blogs
|
||||
APP_PROJECT_NAMES=Org Blogs Api
|
||||
SLNDIR=..
|
||||
|
||||
include $(SLNDIR)/.env
|
||||
|
|
@ -9,9 +9,11 @@ generated/:
|
|||
|
||||
generated/yavscOrg.service:
|
||||
generated/yavscBlogs.service:
|
||||
generated/yavscApi.service:
|
||||
|
||||
generated/yavsc%.service: generated/ template.service $(SLNDIR)/.env
|
||||
@cat template.service | APP_NAME="$*" \
|
||||
DESTDIR="$(DESTDIR)" \
|
||||
HTTP_HOST="$(HTTP_HOST)" \
|
||||
HTTP_PORT="$*_$(HTTP_PORT)" \
|
||||
BASEAPPDIR="$(BASEAPPDIR)" \
|
||||
|
|
@ -33,11 +35,12 @@ generated/yavsc%.service: generated/ template.service $(SLNDIR)/.env
|
|||
@echo Created service file: $@
|
||||
|
||||
|
||||
copy-services: copy-service-Org copy-service-Blogs
|
||||
copy-services: copy-service-Org copy-service-Blogs copy-service-Api
|
||||
copy-service-Org: /etc/systemd/system/yavscOrg.service
|
||||
copy-service-Blogs: /etc/systemd/system/yavscBlogs.service
|
||||
copy-service-Api: /etc/systemd/system/yavscApi.service
|
||||
|
||||
copy-binaries: build_publish_Org build_publish_Blogs stop-services
|
||||
copy-binaries: build_publish_Org build_publish_Blogs build_publish_Api stop-services
|
||||
@for project in $(APP_PROJECT_NAMES); \
|
||||
do LCAPI=$$(echo $${project}|tr [:upper:] [:lower:]) ; \
|
||||
echo "$${project} -> $${LCAPI}" ; \
|
||||
|
|
@ -60,6 +63,8 @@ copy-binaries: build_publish_Org build_publish_Blogs stop-services
|
|||
build_publish_%: clean_publish_dir_%
|
||||
@ASPNETCORE_ENV=$(CONFIGURATION) dotnet publish $(SLNDIR)/src/Yavsc.$*/Yavsc.$*.csproj
|
||||
|
||||
build_publish: build_publish_Org build_publish_Blogs build_publish_Api
|
||||
|
||||
clean_publish_dir_%:
|
||||
@rm -rf $(SLNDIR)/src/Yavsc.$*/bin/$(CONFIGURATION)/$(DOTNET_FRAMEWORK)/publish
|
||||
|
||||
|
|
@ -84,6 +89,7 @@ stop-services:
|
|||
|
||||
$(SLNDIR)/src/Yavsc.Org/bin/$(CONFIGURATION)/$(DOTNET_FRAMEWORK)/publish: build_publish
|
||||
$(SLNDIR)/src/Yavsc.Blogs/bin/$(CONFIGURATION)/$(DOTNET_FRAMEWORK)/publish: build_publish
|
||||
$(SLNDIR)/src/Yavsc.Api/bin/$(CONFIGURATION)/$(DOTNET_FRAMEWORK)/publish: build_publish
|
||||
|
||||
showConfig:
|
||||
@echo CONFIGURATION: $(CONFIGURATION)
|
||||
|
|
@ -92,4 +98,3 @@ showConfig:
|
|||
clean:
|
||||
@rm -rf generated
|
||||
|
||||
.PHONY: build_publish mep showConfig copy-service-Org copy-service-Blogs reinstall clean
|
||||
|
|
|
|||
37
contrib/tmp/yavscBlogs.service
Normal file
37
contrib/tmp/yavscBlogs.service
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
[Unit]
|
||||
Description=yavsc-Blogs
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
Wants=postgresql.service
|
||||
After=postgresql.service
|
||||
|
||||
[Service]
|
||||
RestartSec=5s
|
||||
Type=simple
|
||||
User=yavsc
|
||||
Group=yavsc
|
||||
WorkingDirectory=/srv/www/yavsc
|
||||
ExecStart=/srv/www/yavsc/Yavsc.Blogs
|
||||
Restart=always
|
||||
Environment="HOME="
|
||||
Environment="ANTHROPIC_API_KEY=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"
|
||||
Environment="ANTHROPIC_MAX_TOKENS=255"
|
||||
Environment="ASPNETCORE_Environment="
|
||||
Environment="ASPNETCORE_Kestrel__Endpoints__Http=http://localhost:Blogs_"
|
||||
Environment="ASPNETCORE_ConnectionStrings__YavscConnection=Server=localhost;Port=5432;Database=yavsc;Username=yavsc;Password=4T/X+fOnE;"
|
||||
|
||||
Environment="ASPNETCORE_Smtp__Host=\"mercure.pschneider.f\""
|
||||
Environment="ASPNETCORE_Smtp__Port=465"
|
||||
Environment="ASPNETCORE_Smtp__SenderName=\"Paul Schneider\""
|
||||
Environment="ASPNETCORE_Smtp__SenderEmail=\"paul@pschneider.fr\""
|
||||
Environment="ASPNETCORE_Smtp__UserName=\"paul\""
|
||||
Environment="ASPNETCORE_Smtp__Password=\"j\0Dsn5=t\""
|
||||
|
||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=yavscBlogs
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue