This repo contains the .NET Core 2.0 source code for the 2018 Wakeboard UK Website.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
WakeboardUK2018
.gitignore
Dockerfile
Jenkinsfile
LICENSE
README.md
Vagrantfile
WakeboardUK.sln
codefresh.yml

README.md

Wakeboard UK

Overview

Wakeboard UK are the official committee for boat wakeboarding in the UK, and are part of BWSW. We work in association with the BWSW to promote wakeboarding and push the sport of UK Boat Wakeboarding forward. This repo contains the .net core source code for the 2018 Wakeboard UK Website.

Hosting

Kubernetes

Setting appsettings for Environments in Kubernetes

Create your appsettings file then push to Kubernetes:

kubectl create secret generic secret-appsettings --from-file=secrets/appsettings.Kubernetes.json

Then create a volume for the secrets and map to a folder:

      volumes:
      - name: secrets
        secret:
          defaultMode: 420
          secretName: secret-appsettings

and

        volumeMounts:
        - mountPath: /app/secrets
          name: secrets
          readOnly: true

Developing

Windows

Visual Studio

  • Clone this repo
  • Open the sln
  • Click Run in visual studio

Visual Studio Code

  • Clone this repo
  • In the repo directory
dotnet restore WakeboardUK.sln
cd ./WakeboardUK.Web
dotnet run

Docker

Docker Build

docker build --pull -t wakeboarduk2018 .

Docker Run

docker run --name wakeboarduk2018 --rm -it -p 8090:80 wakeboarduk2018

Docker Build and run with Custom Environment

Note: You need an appsettings.Production.json environment file if you choose a specific environment such as Production.

docker build -t wakeboarduk2018 . && docker run --name wakeboarduk2018 --rm -it -p 8090:80 wakeboarduk2018 --env ASPNETCORE_ENVIRONMENT="Production"

Cloud9 Linux Virtual Dev Environment

  • Install .net core - Cloud9 uses Ubuntu Linux, to install .net core on C9:
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
sudo apt-get update
apt-cache search dotnet-dev
sudo apt-get install dotnet-dev-2.0.0-preview1-005977
  • Update the appsettings.json to point to a Microsoft Sql Server
  • Cloud9 requires a special port and ip address setting for the dotnet run command.
  • Restore and run the app by the following commands:
dotnet restore WakeboardUK.sln
cd ./WakeboardUK2018
ASPNETCORE_URLS="https://$IP:$PORT" dotnet run

Data

Entity Framework Migrations

To add a new migration:

PM> Add-Migration InitialModels

Tech Stack

  • Dev
    • c# .net Core 2.0
    • Sql Server
    • Bulma.io CSS Framework
  • Devops
    • Github
    • Jenkins Blue Ocean
    • Octopus Deploy Cloud
    • jFrog Artifactory
    • Azure Hosting
    • Google Cloud Kubernetes Cluster
    • Azure AKS

Developed by Jeremy Nevill.

Copyright (c) 2007-2018 Jeremy Nevill.