Skip to content

Commit 21eea00

Browse files
committed
Merge remote-tracking branch 'origin/OpenIdDict' into feature/AuthRework
# Conflicts: # NetEvent/Server/Data/ApplicationDbContext.cs # NetEvent/Server/NetEvent.Server.csproj # NetEvent/Server/Program.cs
2 parents a8f12a1 + dc6aa4f commit 21eea00

48 files changed

Lines changed: 1619 additions & 358 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
DBProvider=psql
2+
DBName=NETEVENT
3+
DBServer=netevent_psql
4+
DBPort=5432
5+
DBUser=NETEVENTDBUSER
6+
DBPassword=NETEVENTDBPASSWORD
7+
TZ=Europe/Berlin
8+
ASPNETCORE_URLS=http://+:5000

.github/workflows/test_and_build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
- '**'
1010
- '!Docs/**'
1111
- '!packaging/Docs**'
12+
- '!docker-compose.yml'
13+
- '!.env.example.yml'
1214
- '!README.md'
1315
- '!.github/workflows/website_build.yml'
1416
pull_request:
@@ -20,6 +22,8 @@ on:
2022
- '**'
2123
- '!Docs/**'
2224
- '!packaging/Docs**'
25+
- '!docker-compose.yml'
26+
- '!.env.example.yml'
2327
- '!README.md'
2428
- '!.github/workflows/website_build.yml'
2529

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,4 +446,10 @@ $RECYCLE.BIN/
446446
##
447447
netevent.db
448448
netevent.db-shm
449-
netevent.db-wal
449+
netevent.db-wal
450+
451+
##
452+
## Docker
453+
##
454+
.env
455+
docker-compose.override.yml

Dockerfile

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ LABEL org.opencontainers.image.authors="Alexander@volzit.de"
3030

3131
#dotnet config
3232
ENV ASPNETCORE_URLS="http://+:5000"
33-
ENV ConnectionStrings__DefaultConnection="Data Source=/data/netevent.db"
33+
ENV DBProvider="sqlite"
34+
ENV DBName="/data/netevent.db"
35+
ENV DBServer=""
36+
ENV DBPort=""
37+
ENV DBUser=""
38+
ENV DBPassword=""
39+
ENV TZ="Europe/Berlin"
3440

3541
#User creation
3642
RUN groupadd -g 1010 -r NetEvent && useradd --create-home --no-log-init -u 1010 -r -g NetEvent NetEvent
@@ -39,13 +45,19 @@ RUN groupadd -g 1010 -r NetEvent && useradd --create-home --no-log-init -u 1010
3945
RUN mkdir /data && chown -R NetEvent:NetEvent /data
4046
VOLUME [ "/data" ]
4147

48+
#container scripts
49+
COPY docker/start-container /usr/local/bin/start-container
50+
COPY docker/wait-for.sh /usr/local/bin/wait-for.sh
51+
RUN chmod +x /usr/local/bin/start-container
52+
RUN chmod +x /usr/local/bin/wait-for.sh
53+
4254
#install prereqs
4355
RUN apt-get update -qqy && DEBIAN_FRONTEND=noninteractive apt-get install -y \
4456
wget apt-transport-https
4557
RUN wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
4658
RUN dpkg -i packages-microsoft-prod.deb
4759
RUN rm packages-microsoft-prod.deb
48-
RUN apt-get update -qqy && apt-get install -y aspnetcore-runtime-6.0 libleptonica-dev libtesseract-dev libc6-dev
60+
RUN apt-get update -qqy && apt-get install -y aspnetcore-runtime-6.0
4961
RUN eval apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
5062

5163
#copy NetEvent files
@@ -63,12 +75,6 @@ ENV SOURCE_COMMIT=$SOURCE_COMMIT
6375
ARG BUILDNODE
6476
ENV BUILDNODE=$BUILDNODE
6577

66-
#fix libraries
67-
WORKDIR /NetEvent/x64
68-
RUN ln -s /usr/lib/x86_64-linux-gnu/liblept.so.5 liblept.so.5
69-
RUN ln -s /usr/lib/x86_64-linux-gnu/libleptonica.so libleptonica-1.80.0.so
70-
RUN ln -s /usr/lib/x86_64-linux-gnu/libtesseract.so libtesseract41.so
71-
7278
#Expose the port used
7379
EXPOSE 5000/tcp
7480

@@ -77,4 +83,4 @@ USER NetEvent
7783

7884
# run
7985
WORKDIR /NetEvent
80-
CMD [ "/bin/sh", "-c", "/NetEvent/NetEvent.Server" ]
86+
CMD [ "/bin/sh", "-c", "start-container" ]

Docs/admin/quickstart.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Admins quick start Guide!
2-
## Running NetEvent
1+
# Admins quickstart guide!
2+
## Running NetEvent with docker
33

44
### Prerequirements
55

@@ -8,7 +8,14 @@
88

99
### Installation
1010

11-
- Download or clone this repository (or the docker-compose.yml)
11+
- Download or clone this repository (or the docker-compose.yml and the .env.example)
1212
- if you want to use a different port than 5000/tcp, change the first 5000 the docker-compose.yml
13+
- copy `.env.example` to `.env` and edit at least the `DBUser` and `DBPassword` values. Attention: DBPort does not change the port of the postgres instance that is configured by default in the compose file!
1314
- run `docker-compose up -d`
1415
- visit your NetEvent installation with your browser, login with Admin and Test123.. and configure your instance
16+
17+
### Notes
18+
19+
- You can find the container image on [Docker Hub](https://hub.docker.com/r/lan2play/netevent)
20+
- You can find the `Dockerfile` inside the root of our github repository and build it yourself
21+
- The container is intended to be running behind any kind of reverse proxy and therfore it is started with http only

Docs/admin/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
- name: Quick Start
1+
- name: Quickstart
22
href: quickstart.md

Docs/develop/quickstart.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
1-
# Developers quick start Guide!
2-
Download and Install .Net6 SDK https://dotnet.microsoft.com/download/dotnet/6.0
1+
# Developers quickstart guide!
32

4-
Install EntityFramework
5-
`dotnet tool install --global dotnet-ef`
3+
* Download and install .Net6 SDK https://dotnet.microsoft.com/download/dotnet/6.0
4+
* Clone the repository https://github.com/Lan2Play/NetEvent.git
5+
* Install EntityFramework with `dotnet tool install --global dotnet-ef`
6+
* Switch into the `NetEvent\NetEvent\Server` folder and create the database with `dotnet ef database update`
67

7-
Switch into NetEvent\Server folder
88

9-
Create DB
10-
`dotnet ef database update`
9+
# create new migrations for the database
10+
Switch into the repository and execute
11+
12+
## with make
13+
14+
`make migration name=MigrationName`
15+
16+
## without make
17+
18+
`dotnet ef migrations add MigrationName --project NetEvent/Server --context PsqlApplicationDbContext --output-dir Migrations/Psql -- --DBProvider psql`
19+
20+
`dotnet ef migrations add MigrationName --project NetEvent/Server --context SqliteApplicationDbContext --output-dir Migrations/Sqlite`

Docs/develop/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- name: Quick Start
1+
- name: Quickstart
22
href: quickstart.md
33
- name: CI / CD
44
href: cicd.md

Docs/index.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
# NetEvent
2+
3+
<!-- [![NetEvent_test_and_build](https://github.com/Lan2Play/NetEvent/actions/workflows/test_and_build.yml/badge.svg)](https://github.com/Lan2Play/NetEvent/actions/workflows/test_and_build.yml) -->
4+
25
<!-- <img alt="NetEvent Logo" src="logo.svg" width="50%"> -->
36

47
is an open source software solution for organizing events, especially focused on lan partys.
58

69
Its currently under heavy development, so only use it for testing or development.
710

811

9-
## Users Quick Start Notes:
10-
1. If you just want to use NetEvent as a user go to [Users guide](user/start.html)
11-
2. If you want to deploy NetEvent, please take a look into the [Quickstart Section of the Admins guide](admin/quickstart.html).
12-
13-
## Developer Notes:
14-
Github Url: [https://github.com/Lan2Play/NetEvent](https://github.com/Lan2Play/NetEvent)
12+
## Users quickstart notes:
13+
- If you just want to use NetEvent as a user go to [Users guide](user/start.html)
14+
- If you want to deploy NetEvent, please take a look into the [Quickstart Section of the Admins guide](admin/quickstart.html).
1515

16+
## Developer notes:
17+
- Github url: [https://github.com/Lan2Play/NetEvent](https://github.com/Lan2Play/NetEvent)
18+
- If you want to contribute to NetEvent, please take a look into the [Developers guide](develop/quickstart.html).
1619

1720

Docs/toc.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
- name: Home
22
href: index.md
3-
- name: Users Guide
3+
- name: Users guide
44
href: user/
5-
- name: Admins Guide
5+
- name: Admins guide
66
href: admin/
7-
- name: Developers Guide
7+
- name: Developers guide
88
href: develop/

0 commit comments

Comments
 (0)