0
0

Do not build custom db image

This commit is contained in:
Serghei Cebotari 2024-02-09 16:48:11 +03:00
parent 69db707d68
commit 27167ace1b
4 changed files with 4 additions and 15 deletions

View File

@ -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
tags: gitea.cebotari.ru/chebser/rhsolutions-api:latest

View File

@ -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" ]

View File

@ -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

View File

@ -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: