Refactor HTML and configuration files for improved structure and consistency
- Updated videos.html to enhance readability and maintainability. - Refactored webpack.config.js for better organization and clarity. - Cleaned up TypeScript configuration files (tsconfig.app.json, tsconfig.json, tsconfig.spec.json) for consistency in formatting. - Adjusted docker-compose.yaml for improved formatting and readability.
This commit is contained in:
@@ -2,8 +2,7 @@ FROM mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm
|
|||||||
|
|
||||||
# Install SQL Tools: SQLPackage and sqlcmd
|
# Install SQL Tools: SQLPackage and sqlcmd
|
||||||
COPY mssql/installSQLtools.sh installSQLtools.sh
|
COPY mssql/installSQLtools.sh installSQLtools.sh
|
||||||
RUN bash ./installSQLtools.sh \
|
RUN bash ./installSQLtools.sh && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts
|
||||||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts
|
|
||||||
|
|
||||||
# RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
# RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
||||||
# echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \
|
# echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \
|
||||||
|
|||||||
64
.devcontainer/mssql/postCreateCommand-backup.sh
Normal file
64
.devcontainer/mssql/postCreateCommand-backup.sh
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
dacpac="false"
|
||||||
|
sqlfiles="false"
|
||||||
|
SApassword=$1
|
||||||
|
dacpath=$2
|
||||||
|
sqlpath=$3
|
||||||
|
|
||||||
|
echo "SELECT * FROM SYS.DATABASES" | dd of=testsqlconnection.sql
|
||||||
|
for i in {1..60};
|
||||||
|
do
|
||||||
|
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SApassword -d master -i testsqlconnection.sql > /dev/null
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
echo "SQL server ready"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo "Not ready yet..."
|
||||||
|
sleep 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rm testsqlconnection.sql
|
||||||
|
|
||||||
|
for f in $dacpath/*
|
||||||
|
do
|
||||||
|
if [ $f == $dacpath/*".dacpac" ]
|
||||||
|
then
|
||||||
|
dacpac="true"
|
||||||
|
echo "Found dacpac $f"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for f in $sqlpath/*
|
||||||
|
do
|
||||||
|
if [ $f == $sqlpath/*".sql" ]
|
||||||
|
then
|
||||||
|
sqlfiles="true"
|
||||||
|
echo "Found SQL file $f"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $sqlfiles == "true" ]
|
||||||
|
then
|
||||||
|
for f in $sqlpath/*
|
||||||
|
do
|
||||||
|
if [ $f == $sqlpath/*".sql" ]
|
||||||
|
then
|
||||||
|
echo "Executing $f"
|
||||||
|
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SApassword -d master -i $f
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $dacpac == "true" ]
|
||||||
|
then
|
||||||
|
for f in $dacpath/*
|
||||||
|
do
|
||||||
|
if [ $f == $dacpath/*".dacpac" ]
|
||||||
|
then
|
||||||
|
dbname=$(basename $f ".dacpac")
|
||||||
|
echo "Deploying dacpac $f"
|
||||||
|
/opt/sqlpackage/sqlpackage /Action:Publish /SourceFile:$f /TargetServerName:localhost /TargetDatabaseName:$dbname /TargetUser:sa /TargetPassword:$SApassword
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
@@ -5,60 +5,9 @@ SApassword=$1
|
|||||||
dacpath=$2
|
dacpath=$2
|
||||||
sqlpath=$3
|
sqlpath=$3
|
||||||
|
|
||||||
echo "SELECT * FROM SYS.DATABASES" | dd of=testsqlconnection.sql
|
cd Api
|
||||||
for i in {1..60};
|
dotnet restore ./Api.csproj
|
||||||
do
|
dotnet build ./Api.csproj
|
||||||
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SApassword -d master -i testsqlconnection.sql > /dev/null
|
dotnet tool install --global dotnet-ef --version 8.*
|
||||||
if [ $? -eq 0 ]
|
export PATH="$PATH:/root/.dotnet/tools"
|
||||||
then
|
dotnet-ef database update --project ./Api.csproj --startup-project ./Api.csproj
|
||||||
echo "SQL server ready"
|
|
||||||
break
|
|
||||||
else
|
|
||||||
echo "Not ready yet..."
|
|
||||||
sleep 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
rm testsqlconnection.sql
|
|
||||||
|
|
||||||
for f in $dacpath/*
|
|
||||||
do
|
|
||||||
if [ $f == $dacpath/*".dacpac" ]
|
|
||||||
then
|
|
||||||
dacpac="true"
|
|
||||||
echo "Found dacpac $f"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
for f in $sqlpath/*
|
|
||||||
do
|
|
||||||
if [ $f == $sqlpath/*".sql" ]
|
|
||||||
then
|
|
||||||
sqlfiles="true"
|
|
||||||
echo "Found SQL file $f"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ $sqlfiles == "true" ]
|
|
||||||
then
|
|
||||||
for f in $sqlpath/*
|
|
||||||
do
|
|
||||||
if [ $f == $sqlpath/*".sql" ]
|
|
||||||
then
|
|
||||||
echo "Executing $f"
|
|
||||||
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SApassword -d master -i $f
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $dacpac == "true" ]
|
|
||||||
then
|
|
||||||
for f in $dacpath/*
|
|
||||||
do
|
|
||||||
if [ $f == $dacpath/*".dacpac" ]
|
|
||||||
then
|
|
||||||
dbname=$(basename $f ".dacpac")
|
|
||||||
echo "Deploying dacpac $f"
|
|
||||||
/opt/sqlpackage/sqlpackage /Action:Publish /SourceFile:$f /TargetServerName:localhost /TargetDatabaseName:$dbname /TargetUser:sa /TargetPassword:$SApassword
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
CREATE DATABASE ApplicationDB;
|
|
||||||
GO
|
|
||||||
@@ -76,7 +76,7 @@ namespace Api
|
|||||||
.AddRewrite(@$"^(?!.*?\b({rewriteString}))^(?!.*?\.\b(jpg|jpeg|png|svg|ttf|woff|woff2|html|js|json|css|ico))", "index.html", false);
|
.AddRewrite(@$"^(?!.*?\b({rewriteString}))^(?!.*?\.\b(jpg|jpeg|png|svg|ttf|woff|woff2|html|js|json|css|ico))", "index.html", false);
|
||||||
app.UseRewriter(rewriteOptions);
|
app.UseRewriter(rewriteOptions);
|
||||||
|
|
||||||
|
// Serve static files from the Angular app
|
||||||
if (app.Environment.IsDevelopment())
|
if (app.Environment.IsDevelopment())
|
||||||
{
|
{
|
||||||
var currentDirectory = Directory.GetCurrentDirectory();
|
var currentDirectory = Directory.GetCurrentDirectory();
|
||||||
|
|||||||
Reference in New Issue
Block a user