Skip to content

Commit

Permalink
Combine to monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoerlitz committed Apr 11, 2024
1 parent ecb6176 commit fd59912
Show file tree
Hide file tree
Showing 616 changed files with 29,457 additions and 3,209 deletions.
25 changes: 25 additions & 0 deletions .docker/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
server {
listen 80;
listen [::]:80;

gzip on;
gzip_static on;
gzip_proxied no-cache no-store private expired auth;
gzip_types text/plain text/css application/javascript;

location /api/v1 {
proxy_pass http://localhost:8001/api/v1/;
}

root /opt/frontend;
location / {
try_files $uri $uri/ /index.html;
}

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
6 changes: 6 additions & 0 deletions .docker/entry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

nginx

# Run Node
cd /opt/backend/src && node Application.js
8 changes: 4 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
dist

README.md
CONTRIBUTING.md
CONTRIBUTING.md
_build
node_modules
.git
55 changes: 0 additions & 55 deletions .env.example

This file was deleted.

163 changes: 18 additions & 145 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,160 +1,33 @@
.idea
.vscode

# Node files
./package-lock.json

# Environment files
.env

# Exclude all irrelevant files (mainly js and log files)
index.js
src/**/*.js

# Exclude storage
storage/*

!storage/tmp/
storage/tmp/*

!storage/uploads/
storage/uploads/*

!storage/.gitkeep
!storage/tmp/.gitkeep
!storage/uploads/.gitkeep

# Exclude log
log/*
!log/.gitkeep

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
node_modules
dist
dist-ssr
_build
*.local

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus
**/*.js

# Serverless directories
.serverless/
# Ignore vite temporary
*.mjs

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
17 changes: 10 additions & 7 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
node_modules
dist
.github

misc/mail-templates
mist/crontab.txt

package.json
package-lock.json

tsconfig.json

Dockerfile
docker-compose.yml

tsconfig.json
tsconfig.node.json

.gitignore
.prettierrc.json
.prettierignore
Expand All @@ -27,4 +24,10 @@ index.js
db/config/config.json
src/**/*.js

.idea/
**/*.scss
**/*.css

index.html

.idea/
_build
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Trainingcenter-Backend
# Contributing to Trainingcenter

Thank you for considering contributing to Trainingcenter-Backend! We appreciate your time and effort to help make our project better.
Thank you for considering contributing to the Trainingcenter! We appreciate your time and effort to help make our project better.

The following is a set of guidelines for contributing to this repository. These are just guidelines, not rules, so use your best judgment and feel free to propose changes to this document in a pull request. Please note that contributions will be reviewed before being merged.

Expand All @@ -17,7 +17,7 @@ There are many ways to contribute to this project! Some suggestions include:

## Getting Started

To get started, [create an issue](https://github.com/vatger/trainingcenter-backend/issues) to discuss the changes you would like to make. This will allow for feedback and suggestions before you spend time coding.
To get started, [create an issue](https://github.com/vatger/trainingcenter-frontend/issues) to discuss the changes you would like to make. This will allow for feedback and suggestions before you spend time coding.

## Pull Request Process

Expand Down
28 changes: 18 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
#######################
# Base Image
#######################
FROM alpine
FROM node:alpine as build

WORKDIR /opt/trainingcenter_backend
WORKDIR /build
COPY package*.json ./
RUN npm install && npm install typescript -g
COPY . .
RUN npm run all:build


FROM nginx:alpine

ARG NODE_ENV=development
WORKDIR /opt

COPY package*.json ./

RUN apk update && apk add --update nodejs npm
RUN npm install --quiet --unsafe-perm --no-progress --no-audit --include=dev
RUN npm install --quiet --unsafe-perm --no-progress --no-audit

COPY . .
COPY --from=build /build/_build/ /opt/

COPY .docker/default.conf /etc/nginx/conf.d/default.conf

# Init cron
ADD entry.sh /entry.sh
ADD .docker/entry.sh /entry.sh
RUN chmod 755 /entry.sh

RUN npm run build
RUN mkdir -p /opt/backend/log

EXPOSE 80

CMD ["sh", "/entry.sh"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Trainingcenter-Backend
# Trainingcenter-Frontend

The trainingcenter-backend project contains the backend code for the VATSIM Germany ATC Training Center. Built using Express.js, this project provides the logic and connection to other services such as the underlying SQL database. Data is exchanged with the React based [trainingcenter-frontend](https://github.com/vatger/trainingcenter-frontend) project.
The trainingcenter-frontend project contains the frontend code for the VATSIM Germany ATC Training Center. Built using React, this project focuses on providing an interactive user interface for both trainees and mentors alike. Data is exchanged with the underlying SQL database using the Express.js based [trainingcenter-backend](https://github.com/vatger/trainingcenter-backend) project.

## Contact

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fd59912

Please sign in to comment.