summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitea/workflows/release.yaml9
-rw-r--r--Database/Dockerfile6
-rw-r--r--Dockerfile1
-rw-r--r--docker-compose.yml3
4 files changed, 4 insertions, 15 deletions
diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml
index 57b09e7..b915d12 100644
--- a/.gitea/workflows/release.yaml
+++ b/.gitea/workflows/release.yaml
@@ -41,11 +41,4 @@ jobs:
context: .
file: ./Dockerfile
push: true
- tags: gitea.cebotari.ru/chebser/rhsolutions-api:latest
- - name: Build database
- uses: docker/build-push-action@v5
- with:
- context: Database
- file: Database/Dockerfile
- push: true
- tags: gitea.cebotari.ru/chebser/rhsolutions-db:latest \ No newline at end of file
+ tags: gitea.cebotari.ru/chebser/rhsolutions-api:latest \ No newline at end of file
diff --git a/Database/Dockerfile b/Database/Dockerfile
deleted file mode 100644
index fea6d9d..0000000
--- a/Database/Dockerfile
+++ /dev/null
@@ -1,6 +0,0 @@
-FROM postgres:16.1-alpine AS build
-ADD ./*.sql /docker-entrypoint-initdb.d
-RUN chmod 644 /docker-entrypoint-initdb.d/*.sql
-EXPOSE 5432
-ENTRYPOINT [ "docker-entrypoint.sh" ]
-CMD [ "postgres" ] \ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 302a615..9c9a263 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,7 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build
WORKDIR /source
COPY . .
+RUN dotnet restore
RUN dotnet publish --property:OutputPath=/app
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled
diff --git a/docker-compose.yml b/docker-compose.yml
index 2e19f56..2700fd0 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -19,7 +19,7 @@ services:
depends_on:
- db
db:
- build: Database/.
+ image: postgres:16
container_name: db
environment:
- POSTGRES_USER=chebser
@@ -27,6 +27,7 @@ services:
- POSTGRES_DB=rhsolutions
volumes:
- db-data:/var/lib/postgresql/data
+ - ./Database:/docker-entrypoint-initdb.d
networks:
- rhsolutions
networks: