Configured auto-deploy #23
23
.gitea/workflows/deploy-dev.yml
Normal file
23
.gitea/workflows/deploy-dev.yml
Normal file
@ -0,0 +1,23 @@
|
||||
name: Publish JOBot on dev
|
||||
on: [push]
|
||||
branch: dev
|
||||
|
||||
jobs:
|
||||
build and deploy:
|
||||
runs-on: host
|
||||
name: Build and deploy
|
||||
volumes:
|
||||
|
||||
steps:
|
||||
- name: Update repo
|
||||
run: |
|
||||
pwd
|
||||
cd /home/dockeruser/jobot-stack
|
||||
git checkout dev
|
||||
git pull
|
||||
docker compose -f compose.dev.yml up -d postgres
|
||||
|
||||
cd /home/dockeruser/jobot-stack/JOBot.Backend
|
||||
dotnet ef database update -- --environment Development
|
||||
docker compose up --build -d
|
||||
|
@ -1,12 +0,0 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"PostgreSQL": "Host=postgres;Port=5432;Database=jobot_test;Username=postgres;Password=LocalDbPass"
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@ services:
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- ./.docker/postgres_data:/var/lib/postgresql/data
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- jobot
|
||||
|
||||
@ -35,4 +35,7 @@ services:
|
||||
- jobot
|
||||
|
||||
networks:
|
||||
jobot:
|
||||
jobot:
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
10
compose.yml
10
compose.yml
@ -5,9 +5,9 @@ services:
|
||||
image: postgres:15
|
||||
environment:
|
||||
POSTGRES_PASSWORD: LocalDbPass
|
||||
POSTGRES_DB: jobot
|
||||
POSTGRES_DB: jobot
|
||||
volumes:
|
||||
- ./.docker/postgres_data:/var/lib/postgresql/data
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- jobot
|
||||
|
||||
@ -32,4 +32,8 @@ services:
|
||||
- jobot
|
||||
|
||||
networks:
|
||||
jobot:
|
||||
jobot:
|
||||
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
Loading…
x
Reference in New Issue
Block a user