mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 17:25:32 +00:00
Started adding dockerfile
This commit is contained in:
23
Dockerfile
23
Dockerfile
@@ -1,23 +0,0 @@
|
|||||||
# PREREQUISITES
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
|
||||||
RUN apt update
|
|
||||||
RUN apt install openssh-server nodejs npm -y
|
|
||||||
|
|
||||||
# CLONE & SETUP
|
|
||||||
COPY . .
|
|
||||||
RUN mkdir /data/
|
|
||||||
RUN mkdir /data/hamann/
|
|
||||||
RUN mkdir /data/xml/
|
|
||||||
RUN git clone https://github.com/Theodor-Springmann-Stiftung/hamann-xml.git /data/xml/
|
|
||||||
|
|
||||||
# COMPILE & PUBLISH
|
|
||||||
WORKDIR HaWeb/
|
|
||||||
RUN dotnet restore
|
|
||||||
RUN npm install
|
|
||||||
RUN npm run css_build
|
|
||||||
RUN dotnet publish --no-restore -o /app
|
|
||||||
|
|
||||||
# RUN
|
|
||||||
WORKDIR /app
|
|
||||||
RUN DOTNET_ENVIRONMENT=Docker dotnet HaWeb.dll
|
|
||||||
EXPOSE 5000
|
|
||||||
24
HaWeb/Dockerfile
Normal file
24
HaWeb/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
unzip \
|
||||||
|
ca-certificates \
|
||||||
|
build-base
|
||||||
|
|
||||||
|
# download and unzip PocketBase
|
||||||
|
ADD https://go.dev/dl/go1.22.3.linux-amd64.tar.gz /tmp/go.tar.gz
|
||||||
|
RUN tar -C /usr/local -xzf /tmp/go.tar.gz
|
||||||
|
RUN export PATH=$PATH:/usr/local/go/bin
|
||||||
|
|
||||||
|
# uncomment to copy the local pb_migrations dir into the image
|
||||||
|
COPY . .
|
||||||
|
RUN /usr/local/go/bin/go build -tags "sqlite_fts5 sqlite_json sqlite_foreign_keys sqlite_vtable sqlite_math_functions"
|
||||||
|
RUN ./myapp migrate --dev
|
||||||
|
RUN ./myapp migrateimages --dev
|
||||||
|
RUN ./myapp migratestatics --dev
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
# start PocketBase
|
||||||
|
CMD ["./myapp", "serve", "--http=0.0.0.0:8080"]
|
||||||
@@ -1,29 +1,28 @@
|
|||||||
{
|
{
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
"Microsoft.AspNetCore": "Warning"
|
"Microsoft.AspNetCore": "Warning"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"FeatureManagement": {
|
"FeatureManagement": {
|
||||||
"AdminService": true,
|
"AdminService": true,
|
||||||
"LocalPublishService": true,
|
"LocalPublishService": true,
|
||||||
"SyntaxCheck": true,
|
"SyntaxCheck": true,
|
||||||
"Notifications": true
|
"Notifications": true
|
||||||
},
|
},
|
||||||
"AllowedWebSocketConnections": "*",
|
"AllowedWebSocketConnections": "*",
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"HamannFileStoreLinux": "/var/www/vhosts/development.hamann-ausgabe.de/httpdocs/Hamann/",
|
"HamannFileStoreLinux": "./Hamann",
|
||||||
"BareRepositoryPathLinux": "/var/www/vhosts/development.hamann-ausgabe.de/httpdocs/Bare/",
|
"BareRepositoryPathLinux": "hamann-xml/.git/",
|
||||||
"BareRepositoryPathWindows": "C:/Users/simon/source/hamann-xml/.git/",
|
"BareRepositoryPathWindows": "C:/Users/simon/source/hamann-xml/.git/",
|
||||||
"WorkingTreePathLinux": "/var/www/vhosts/development.hamann-ausgabe.de/httpdocs/Repo/",
|
"WorkingTreePathLinux": "hamann-xml/",
|
||||||
"RepositoryBranch": "main",
|
"RepositoryBranch": "main",
|
||||||
"RepositoryURL": "https://github.com/Theodor-Springmann-Stiftung/hamann-xml",
|
"RepositoryURL": "https://github.com/Theodor-Springmann-Stiftung/hamann-xml",
|
||||||
"StoredPDFPathWindows": "",
|
"StoredPDFPathWindows": "",
|
||||||
"StoredPDFPathLinux": "",
|
"StoredPDFPathLinux": "",
|
||||||
"FileSizeLimit": 52428800,
|
"FileSizeLimit": 52428800,
|
||||||
"AvailableStartYear": 1700,
|
"AvailableStartYear": 1700,
|
||||||
"AvailableEndYear": 1800,
|
"AvailableEndYear": 1800,
|
||||||
"LettersOnPage": 80
|
"LettersOnPage": 80
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
58
dockerfile
Normal file
58
dockerfile
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# PREREQUISITES
|
||||||
|
FROM ubuntu
|
||||||
|
|
||||||
|
COPY . /source
|
||||||
|
|
||||||
|
RUN apt update
|
||||||
|
RUN apt upgrade -y
|
||||||
|
RUN apt install git wget curl libicu-dev -y
|
||||||
|
|
||||||
|
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
|
||||||
|
RUN chmod +x dotnet-install.sh
|
||||||
|
RUN ./dotnet-install.sh --channel 6.0
|
||||||
|
ENV DOTNET_DIR=/root/.dotnet
|
||||||
|
|
||||||
|
RUN wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh -O install.sh
|
||||||
|
RUN chmod +x install.sh
|
||||||
|
RUN ./install.sh
|
||||||
|
|
||||||
|
ENV NODE_VERSION=22.12.0
|
||||||
|
ENV NVM_DIR=/root/.nvm
|
||||||
|
|
||||||
|
ENV PATH="/root/.dotnet:${PATH}"
|
||||||
|
ENV PATH="/root/.nvm:${PATH}"
|
||||||
|
|
||||||
|
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
|
||||||
|
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
|
||||||
|
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
|
||||||
|
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
|
||||||
|
|
||||||
|
WORKDIR /source/HaWeb
|
||||||
|
RUN npm install
|
||||||
|
RUN "$DOTNET_DIR/dotnet" restore
|
||||||
|
RUN "$DOTNET_DIR/dotnet" publish -c Release -o /app
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
CMD ["dotnet", "HaWeb.dll"]
|
||||||
|
|
||||||
|
# RUN apt update
|
||||||
|
# RUN apt install openssh-server nodejs npm -y
|
||||||
|
#
|
||||||
|
# # CLONE & SETUP
|
||||||
|
# COPY . .
|
||||||
|
# RUN mkdir /data/
|
||||||
|
# RUN mkdir /data/hamann/
|
||||||
|
# RUN mkdir /data/xml/
|
||||||
|
# RUN git clone https://github.com/Theodor-Springmann-Stiftung/hamann-xml.git /data/xml/
|
||||||
|
#
|
||||||
|
# # COMPILE & PUBLISH
|
||||||
|
# WORKDIR HaWeb/
|
||||||
|
# RUN dotnet restore
|
||||||
|
# RUN npm install
|
||||||
|
# RUN npm run css_build
|
||||||
|
# RUN dotnet publish --no-restore -o /app
|
||||||
|
#
|
||||||
|
# # RUN
|
||||||
|
# WORKDIR /app
|
||||||
|
# RUN DOTNET_ENVIRONMENT=Docker dotnet HaWeb.dll
|
||||||
|
# EXPOSE 5000
|
||||||
Reference in New Issue
Block a user