Update dockerfile + docker compose and appSettings
This commit is contained in:
parent
75a6b0c323
commit
7f6801c1f8
9
ManagerService/Deployment/README.md
Normal file
9
ManagerService/Deployment/README.md
Normal file
@ -0,0 +1,9 @@
|
||||
Pour firebase cors.
|
||||
|
||||
gcloud config set project mymuseum-3b97f
|
||||
|
||||
gsutil cors get gs://mymuseum-3b97f.appspot.com
|
||||
|
||||
Pour le moment :
|
||||
|
||||
[{"maxAgeSeconds": 3600, "method": ["GET", "POST", "DELETE", "PUT"], "origin": ["http://localhost:49430", "https://manager.myinfomate.be", "https://manager.mymuseum.be", "https://fortsaintheribert.mymuseum.be", "https://fortsaintheribert.myinfomate.be", "https://visitnamur.myinfomate.be"]}]
|
||||
@ -16,22 +16,46 @@ services:
|
||||
networks:
|
||||
- myim-network
|
||||
|
||||
# Admin Dashboard for PostgresSQL Database
|
||||
pgadmin:
|
||||
image: dpage/pgadmin4
|
||||
container_name: pgadmin
|
||||
restart: unless-stopped
|
||||
# # Admin Dashboard for PostgresSQL Database
|
||||
# pgadmin:
|
||||
# image: dpage/pgadmin4
|
||||
# container_name: pgadmin
|
||||
# restart: unless-stopped
|
||||
# environment:
|
||||
# PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
|
||||
# PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
|
||||
# ports:
|
||||
# - "5050:80"
|
||||
# volumes:
|
||||
# - pgadmin-data:/var/lib/pgadmin
|
||||
# networks:
|
||||
# - myim-network
|
||||
# depends_on:
|
||||
# - postgres
|
||||
|
||||
managerService:
|
||||
container_name: "manager-service"
|
||||
image: registry.unov.be/myinfomate/manager-service/managerservice:version-3.0.0
|
||||
environment:
|
||||
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
|
||||
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
|
||||
ports:
|
||||
- "5050:80"
|
||||
volumes:
|
||||
- pgadmin-data:/var/lib/pgadmin
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
networks:
|
||||
- myim-network
|
||||
depends_on:
|
||||
- postgres
|
||||
ports:
|
||||
- 5000:8080
|
||||
volumes:
|
||||
- /etc/managerservice
|
||||
restart: always
|
||||
|
||||
managerWeb:
|
||||
container_name: "manager-web"
|
||||
image: registry.unov.be/myinfomate/manager:version-3.0.0
|
||||
networks:
|
||||
- myim-network
|
||||
ports:
|
||||
- "49430:80"
|
||||
volumes:
|
||||
- /etc/managerweb
|
||||
restart: always
|
||||
|
||||
# myim-api:
|
||||
# image: myim/myim-api
|
||||
|
||||
84
ManagerService/Deployment/docker-compose.preprod.yaml
Normal file
84
ManagerService/Deployment/docker-compose.preprod.yaml
Normal file
@ -0,0 +1,84 @@
|
||||
---
|
||||
version: '3.9'
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16
|
||||
container_name: myim_postgres
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DATABASE}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- myim-network
|
||||
|
||||
# # Admin Dashboard for PostgresSQL Database
|
||||
# pgadmin:
|
||||
# image: dpage/pgadmin4
|
||||
# container_name: pgadmin
|
||||
# restart: unless-stopped
|
||||
# environment:
|
||||
# PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
|
||||
# PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
|
||||
# ports:
|
||||
# - "5050:80"
|
||||
# volumes:
|
||||
# - pgadmin-data:/var/lib/pgadmin
|
||||
# networks:
|
||||
# - myim-network
|
||||
# depends_on:
|
||||
# - postgres
|
||||
|
||||
managerService:
|
||||
container_name: "manager-service"
|
||||
image: registry.unov.be/myinfomate/manager-service/managerservice:version-3.0.0
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=PreProduction
|
||||
networks:
|
||||
- myim-network
|
||||
ports:
|
||||
- 5000:8080
|
||||
volumes:
|
||||
- /etc/managerservice
|
||||
restart: always
|
||||
|
||||
managerWeb:
|
||||
container_name: "manager-web"
|
||||
image: registry.unov.be/myinfomate/manager:version-3.0.0
|
||||
networks:
|
||||
- myim-network
|
||||
ports:
|
||||
- "49430:80"
|
||||
volumes:
|
||||
- /etc/managerweb
|
||||
restart: always
|
||||
|
||||
# myim-api:
|
||||
# image: myim/myim-api
|
||||
# container_name: myim_api
|
||||
# build:
|
||||
# context: ../.
|
||||
# dockerfile: ./Dockerfile
|
||||
# args:
|
||||
# - mode=dev
|
||||
# restart: unless-stopped
|
||||
# ports:
|
||||
# - "5093:80"
|
||||
# networks:
|
||||
# - myim-network
|
||||
# depends_on:
|
||||
# - postgres
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
pgadmin-data:
|
||||
|
||||
networks:
|
||||
myim-network:
|
||||
driver: bridge
|
||||
name: myim-network
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
||||
RUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
VOLUME ["/etc/managerservice"]
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["ManagerService/ManagerService.csproj", "ManagerService/"]
|
||||
COPY ["Manager.Interfaces/Manager.Interfaces.csproj", "Manager.Interfaces/"]
|
||||
COPY ["Manager.Framework/Manager.Framework.csproj", "Manager.Framework/"]
|
||||
#COPY ["Manager.Interfaces/Manager.Interfaces.csproj", "Manager.Interfaces/"]
|
||||
#COPY ["Manager.Framework/Manager.Framework.csproj", "Manager.Framework/"]
|
||||
RUN dotnet restore "ManagerService/ManagerService.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/ManagerService"
|
||||
|
||||
@ -23,5 +23,13 @@
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="appsettings.PreProduction.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
|
||||
@ -9,12 +9,12 @@ by editing this MSBuild file. In order to learn more about this please visit htt
|
||||
<DockerPublish>true</DockerPublish>
|
||||
<RegistryUrl>https://registry.unov.be</RegistryUrl>
|
||||
<UserName>admin</UserName>
|
||||
<PublishImageTag>version-2.0.0</PublishImageTag>
|
||||
<PublishImageTag>version-3.0.0</PublishImageTag>
|
||||
<PublishProvider>ContainerRegistry</PublishProvider>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<ProjectGuid>042e0bc4-8dcf-4eec-8420-c71aa85d4d99</ProjectGuid>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
<SelfContained>false</SelfContained>
|
||||
</PropertyGroup>
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>Custom</WebPublishMethod>
|
||||
<DockerPublish>true</DockerPublish>
|
||||
<RegistryUrl>https://registry.unov.be/myinfomate/manager-service</RegistryUrl>
|
||||
<PublishImageTag>version-3.0.0</PublishImageTag>
|
||||
<PublishProvider>ContainerRegistry</PublishProvider>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<ProjectGuid>042e0bc4-8dcf-4eec-8420-c71aa85d4d99</ProjectGuid>
|
||||
<_TargetId>DockerCustomContainerRegistry</_TargetId>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -168,7 +168,7 @@ namespace ManagerService
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
/*app.UseCors(
|
||||
options => options.WithOrigins("http://localhost:60109").AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader().AllowCredentials()
|
||||
options => options.WithOrigins("http://localhost:49430").AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader().AllowCredentials()
|
||||
);*/
|
||||
|
||||
if (env.IsDevelopment())
|
||||
|
||||
18
ManagerService/appsettings.PreProduction.json
Normal file
18
ManagerService/appsettings.PreProduction.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
//"TabletDb": "mongodb://admin:MioTech4ever!@localhost:27017" //DEV
|
||||
//"TabletDb": "mongodb://admin:MioTech4ever!@localhost:27017", //PROD - Thomas
|
||||
//"TabletDb": "mongodb://admin:MioTech4ever!@192.168.31.140:27017" //PROD - Thomas
|
||||
//"TabletDb": "mongodb://admin:mdlf2021!@localhost:27017" //PROD MDLF
|
||||
"TabletDb": "mongodb://admin:MyMuseum2022!@51.77.222.154:27017", //PROD MyMuseum
|
||||
//"TabletDb": "mongodb://admin:MyInfoMate2023!@135.125.232.116:27017" //PROD MyInfoMate
|
||||
"PostgresConnection": "Host=postgres;Database=my_info_mate;Username=mym;Password=mym"
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user