mirror of
https://github.com/bitwarden/server.git
synced 2024-11-25 12:45:18 +01:00
add docker build for admin
This commit is contained in:
parent
f07cb3ab07
commit
24b8619bd1
@ -10,5 +10,6 @@ echo "=================="
|
|||||||
& $dir\util\Nginx\build.ps1
|
& $dir\util\Nginx\build.ps1
|
||||||
& $dir\util\Attachments\build.ps1
|
& $dir\util\Attachments\build.ps1
|
||||||
& $dir\src\Icons\build.ps1
|
& $dir\src\Icons\build.ps1
|
||||||
|
& $dir\src\Admin\build.ps1
|
||||||
& $dir\util\MsSql\build.ps1
|
& $dir\util\MsSql\build.ps1
|
||||||
& $dir\util\Setup\build.ps1
|
& $dir\util\Setup\build.ps1
|
||||||
|
5
build.sh
5
build.sh
@ -17,6 +17,7 @@ then
|
|||||||
docker push bitwarden/server:$TAG
|
docker push bitwarden/server:$TAG
|
||||||
docker push bitwarden/attachments:$TAG
|
docker push bitwarden/attachments:$TAG
|
||||||
docker push bitwarden/icons:$TAG
|
docker push bitwarden/icons:$TAG
|
||||||
|
docker push bitwarden/admin:$TAG
|
||||||
docker push bitwarden/nginx:$TAG
|
docker push bitwarden/nginx:$TAG
|
||||||
docker push bitwarden/mssql:$TAG
|
docker push bitwarden/mssql:$TAG
|
||||||
docker push bitwarden/setup:$TAG
|
docker push bitwarden/setup:$TAG
|
||||||
@ -31,6 +32,7 @@ then
|
|||||||
docker tag bitwarden/server bitwarden/server:$TAG
|
docker tag bitwarden/server bitwarden/server:$TAG
|
||||||
docker tag bitwarden/attachments bitwarden/attachments:$TAG
|
docker tag bitwarden/attachments bitwarden/attachments:$TAG
|
||||||
docker tag bitwarden/icons bitwarden/icons:$TAG
|
docker tag bitwarden/icons bitwarden/icons:$TAG
|
||||||
|
docker tag bitwarden/admin bitwarden/admin:$TAG
|
||||||
docker tag bitwarden/nginx bitwarden/nginx:$TAG
|
docker tag bitwarden/nginx bitwarden/nginx:$TAG
|
||||||
docker tag bitwarden/mssql bitwarden/mssql:$TAG
|
docker tag bitwarden/mssql bitwarden/mssql:$TAG
|
||||||
docker tag bitwarden/setup bitwarden/setup:$TAG
|
docker tag bitwarden/setup bitwarden/setup:$TAG
|
||||||
@ -56,6 +58,9 @@ else
|
|||||||
chmod u+x $DIR/src/Icons/build.sh
|
chmod u+x $DIR/src/Icons/build.sh
|
||||||
$DIR/src/Icons/build.sh
|
$DIR/src/Icons/build.sh
|
||||||
|
|
||||||
|
chmod u+x $DIR/src/Admin/build.sh
|
||||||
|
$DIR/src/Admin/build.sh
|
||||||
|
|
||||||
chmod u+x $DIR/util/MsSql/build.sh
|
chmod u+x $DIR/util/MsSql/build.sh
|
||||||
$DIR/util/MsSql/build.sh
|
$DIR/util/MsSql/build.sh
|
||||||
|
|
||||||
|
4
src/Admin/.dockerignore
Normal file
4
src/Admin/.dockerignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
*
|
||||||
|
!obj/Docker/publish/*
|
||||||
|
!obj/Docker/empty/
|
||||||
|
!entrypoint.sh
|
9
src/Admin/Dockerfile
Normal file
9
src/Admin/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
FROM microsoft/aspnetcore:2.0.5
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
EXPOSE 80
|
||||||
|
COPY obj/Docker/publish .
|
||||||
|
|
||||||
|
COPY entrypoint.sh /
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
14
src/Admin/build.ps1
Normal file
14
src/Admin/build.ps1
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||||
|
|
||||||
|
echo "`n## Building Admin"
|
||||||
|
|
||||||
|
echo "`nBuilding app"
|
||||||
|
echo ".NET Core version $(dotnet --version)"
|
||||||
|
echo "Clean"
|
||||||
|
dotnet clean $dir\Admin.csproj -f netcoreapp2.0 -c "Release" -o $dir\obj\Docker\publish
|
||||||
|
echo "Publish"
|
||||||
|
dotnet publish $dir\Admin.csproj -f netcoreapp2.0 -c "Release" -o $dir\obj\Docker\publish
|
||||||
|
|
||||||
|
echo "`nBuilding docker image"
|
||||||
|
docker --version
|
||||||
|
docker build -t bitwarden/admin $dir\.
|
17
src/Admin/build.sh
Normal file
17
src/Admin/build.sh
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
echo -e "\n## Building Admin"
|
||||||
|
|
||||||
|
echo -e "\nBuilding app"
|
||||||
|
echo ".NET Core version $(dotnet --version)"
|
||||||
|
echo "Clean"
|
||||||
|
dotnet clean $DIR/Admin.csproj -f netcoreapp2.0 -c "Release" -o $DIR/obj/Docker/publish
|
||||||
|
echo "Publish"
|
||||||
|
dotnet publish $DIR/Admin.csproj -f netcoreapp2.0 -c "Release" -o $DIR/obj/Docker/publish
|
||||||
|
|
||||||
|
echo -e "\nBuilding docker image"
|
||||||
|
docker --version
|
||||||
|
docker build -t bitwarden/admin $DIR/.
|
3
src/Admin/entrypoint.sh
Normal file
3
src/Admin/entrypoint.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
dotnet /app/Admin.dll
|
@ -145,6 +145,16 @@ services:
|
|||||||
- global.env
|
- global.env
|
||||||
- ../env/global.override.env
|
- ../env/global.override.env
|
||||||
|
|
||||||
|
admin:
|
||||||
|
image: bitwarden/admin:{CoreVersion}
|
||||||
|
container_name: bitwarden-admin
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ../core:/etc/bitwarden/core
|
||||||
|
env_file:
|
||||||
|
- global.env
|
||||||
|
- ../env/global.override.env
|
||||||
|
|
||||||
icons:
|
icons:
|
||||||
image: bitwarden/icons:{CoreVersion}
|
image: bitwarden/icons:{CoreVersion}
|
||||||
container_name: bitwarden-icons
|
container_name: bitwarden-icons
|
||||||
|
@ -193,6 +193,10 @@ server {{
|
|||||||
location /icons/ {{
|
location /icons/ {{
|
||||||
proxy_pass http://icons/;
|
proxy_pass http://icons/;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
location /admin/ {{
|
||||||
|
proxy_pass http://admin/;
|
||||||
|
}}
|
||||||
}}");
|
}}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user