-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from AleksanderNekr/develop
Alpha release
- Loading branch information
Showing
169 changed files
with
18,665 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Include any files or directories that you don't want to be copied to your | ||
# container here (e.g., local build artifacts, temporary files, etc.). | ||
# | ||
# For more help, visit the .dockerignore file reference guide at | ||
# https://docs.docker.com/go/build-context-dockerignore/ | ||
|
||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/.next | ||
**/.cache | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/charts | ||
**/docker-compose* | ||
**/compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
**/build | ||
**/dist | ||
LICENSE | ||
README.md | ||
**/.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.idea | ||
bin | ||
obj | ||
obj | ||
data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
### Building and running your application | ||
|
||
When you're ready, start your application by running: | ||
`docker compose up --build`. | ||
|
||
Your application will be available at http://localhost:8080. | ||
|
||
### Deploying your application to the cloud | ||
|
||
First, build your image, e.g.: `docker build -t myapp .`. | ||
If your cloud uses a different CPU architecture than your development | ||
machine (e.g., you are on a Mac M1 and your cloud provider is amd64), | ||
you'll want to build the image for that platform, e.g.: | ||
`docker build --platform=linux/amd64 -t myapp .`. | ||
|
||
Then, push it to your registry, e.g. `docker push myregistry.com/myapp`. | ||
|
||
Consult Docker's [getting started](https://docs.docker.com/go/get-started-sharing/) | ||
docs for more detail on building and pushing. | ||
|
||
### References | ||
* [Docker's .NET guide](https://docs.docker.com/language/dotnet/) | ||
* The [dotnet-docker](https://github.com/dotnet/dotnet-docker/tree/main/samples) | ||
repository has many relevant samples and docs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base | ||
WORKDIR /app | ||
EXPOSE 80 | ||
EXPOSE 443 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS prepare-restore-files | ||
ENV PATH="${PATH}:/root/.dotnet/tools" | ||
RUN dotnet tool install --global --no-cache dotnet-subset --version 0.3.2 | ||
WORKDIR /app/src/ | ||
COPY . . | ||
RUN dotnet subset restore "src/Backend/Backend.csproj" --root-directory /app/src --output restore_subset/ | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
WORKDIR /app/src | ||
COPY --from=prepare-restore-files app/src/restore_subset . | ||
RUN dotnet restore "src/Backend/Backend.csproj" | ||
COPY . . | ||
RUN dotnet build "src/Backend/Backend.csproj" -c Release -o /app/build | ||
# For healthchecks | ||
RUN apt-get update && apt-get install -y curl | ||
|
||
FROM build AS publish | ||
RUN dotnet publish "src/Backend/Backend.csproj" -c Release -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "Backend.dll"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM node:20-alpine as angular | ||
WORKDIR /ng-app | ||
COPY src/Frontend/package*.json ./ | ||
RUN npm install -g npm@10.5.0 | ||
RUN npm ci --legacy-peer-deps | ||
COPY ./src/Frontend/ ./ | ||
RUN npm run build | ||
|
||
FROM nginx:alpine | ||
COPY ./nginx-cc.conf /etc/nginx/conf.d/ | ||
RUN rm /etc/nginx/conf.d/default.conf | ||
RUN mv /etc/nginx/conf.d/nginx-cc.conf /etc/nginx/conf.d/default.conf | ||
|
||
COPY --from=angular /ng-app/dist/frontend/browser /usr/share/nginx/html | ||
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
services: | ||
front: | ||
container_name: front | ||
build: | ||
context: ./src/Frontend/ | ||
environment: | ||
NODE_ENV: production | ||
ports: | ||
- 4200:4200 | ||
depends_on: | ||
postgres: | ||
condition: service_healthy | ||
redis: | ||
condition: service_started | ||
server: | ||
container_name: back | ||
build: | ||
context: ./src/Backend/ | ||
target: final | ||
ports: | ||
- 8080:8080 | ||
depends_on: | ||
front: | ||
condition: service_started | ||
postgres: | ||
image: postgres | ||
restart: unless-stopped | ||
environment: | ||
DATABASE_HOST: localhost | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres | ||
ports: | ||
- "5432:5432" | ||
volumes: | ||
- ./data:/var/lib/postgresql/data | ||
healthcheck: | ||
test: [ "CMD", "pg_isready" ] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 5 | ||
redis: | ||
container_name: redis | ||
image: redis:alpine | ||
ports: | ||
- "6379:6379" | ||
command: > | ||
redis-server --bind redis | ||
--requirepass redispass | ||
--maxmemory 30mb | ||
--maxmemory-policy allkeys-lru | ||
--appendonly yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
server { | ||
listen 8080; | ||
server_name localhost; | ||
|
||
root /usr/share/nginx/html; | ||
index index.html; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Include any files or directories that you don't want to be copied to your | ||
# container here (e.g., local build artifacts, temporary files, etc.). | ||
# | ||
# For more help, visit the .dockerignore file reference guide at | ||
# https://docs.docker.com/go/build-context-dockerignore/ | ||
|
||
**/.DS_Store | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
LICENSE | ||
README.md |
Oops, something went wrong.