chore: add project configuration and infrastructure
This commit establishes the base configuration and deployment settings.
This commit is contained in:
@@ -27,6 +27,7 @@ insert_final_newline = false
|
|||||||
dotnet_diagnostic.IDE0058.severity = none
|
dotnet_diagnostic.IDE0058.severity = none
|
||||||
dotnet_diagnostic.IDE0100.severity = none
|
dotnet_diagnostic.IDE0100.severity = none
|
||||||
dotnet_diagnostic.IDE3000.severity = none
|
dotnet_diagnostic.IDE3000.severity = none
|
||||||
|
dotnet_diagnostic.CA1848.severity = none
|
||||||
|
|
||||||
# Organize usings
|
# Organize usings
|
||||||
dotnet_separate_import_directive_groups = true
|
dotnet_separate_import_directive_groups = true
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
- name: Build and push server image
|
- name: Build and push server image
|
||||||
run: |
|
run: |
|
||||||
TAG=${{ secrets.DOCKERHUB_USERNAME }}/groundsforsupport.stevanfreeborn.com:${{ steps.version.outputs.version }}
|
TAG=${{ secrets.DOCKERHUB_USERNAME }}/groundsforsupport.stevanfreeborn.com:${{ steps.version.outputs.version }}
|
||||||
docker build -t $TAG src/
|
docker build --build-arg VITE_STRIPE_API_KEY=${{ secrets.VITE_STRIPE_API_KEY }} -t $TAG src/
|
||||||
docker push $TAG
|
docker push $TAG
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy to server
|
name: Deploy to server
|
||||||
@@ -60,5 +60,9 @@ jobs:
|
|||||||
--restart always \
|
--restart always \
|
||||||
-d \
|
-d \
|
||||||
-p 4343:8080 \
|
-p 4343:8080 \
|
||||||
|
-e StripeOptions__ApiKey=${{ secrets.STRIPE_API_KEY }} \
|
||||||
|
-e StripeOptions__EventsWebhookSecret=${{ secrets.STRIPE_EVENTS_WEBHOOK_SECRET }} \
|
||||||
|
-e ContextOptions__DatabaseFilePath=/app/data/groundsforsupport.db \
|
||||||
|
-v /home/${{ secrets.SSH_USERNAME }}/groundsforsupport.stevanfreeborn.com/data:/app/data \
|
||||||
--name groundsforsupport.stevanfreeborn.com \
|
--name groundsforsupport.stevanfreeborn.com \
|
||||||
$TAG
|
$TAG
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
appsettings*.json
|
appsettings*.json
|
||||||
!appsettings.Example.json
|
!appsettings.Example.json
|
||||||
wwwroot/
|
wwwroot/
|
||||||
|
*.db
|
||||||
|
*.db-shm
|
||||||
|
*.db-wal
|
||||||
|
|
||||||
# dotenv files
|
# dotenv files
|
||||||
.env
|
.env
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ RUN apt-get update && \
|
|||||||
COPY ["GroundsForSupport.Server/GroundsForSupport.Server.csproj", "GroundsForSupport.Server/"]
|
COPY ["GroundsForSupport.Server/GroundsForSupport.Server.csproj", "GroundsForSupport.Server/"]
|
||||||
RUN dotnet restore "GroundsForSupport.Server/GroundsForSupport.Server.csproj"
|
RUN dotnet restore "GroundsForSupport.Server/GroundsForSupport.Server.csproj"
|
||||||
|
|
||||||
|
ARG VITE_STRIPE_API_KEY
|
||||||
|
ENV VITE_STRIPE_API_KEY=$VITE_STRIPE_API_KEY
|
||||||
COPY . .
|
COPY . .
|
||||||
WORKDIR "/src/GroundsForSupport.Server"
|
WORKDIR "/src/GroundsForSupport.Server"
|
||||||
RUN dotnet build "GroundsForSupport.Server.csproj" -c Release -o /app/build
|
RUN dotnet build "GroundsForSupport.Server.csproj" -c Release -o /app/build
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
{
|
{
|
||||||
"StripeOptions": {
|
"StripeOptions": {
|
||||||
"ApiKey": "ApiKey"
|
"ApiKey": "ApiKey",
|
||||||
|
"EventsWebhookSecret": "EventsWebhookSecret"
|
||||||
|
},
|
||||||
|
"ContextOptions": {
|
||||||
|
"DatabaseFilePath": "DatabaseFilePath"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user