openactive / OpenActive.Server.NET

.NET server library, including an OpenActive Reference Implementation
MIT License
0 stars 7 forks source link

feat: Publish docker image of reference implementation #195

Open nickevansuk opened 1 year ago

nickevansuk commented 1 year ago

Some terminal commands that were useful during this work, in case they hold the clues to completing this:

OpenActive.Server.NET $ docker build -t refimpl .
OpenActive.Server.NET $ docker run -it --rm -p 5000:80 --name aspnetcore_sample aspnetapp                         
OpenActive.Server.NET $ docker run -it --rm -p 5000:5000 --name refimpl_sample refimpl
OpenActive.Server.NET $ docker run -it --rm -p 5000:5000 --name refimpl_sample refimpl
OpenActive.Server.NET $ docker run -it --rm -p 5001:5001 --name refimpl_sample refimpl
OpenActive.Server.NET $ docker run -it --rm -p 80:5000 --name refimpl_sample refimpl
OpenActive.Server.NET $ docker run -it --rm -p 5001:80 --name refimpl_sample refimpl
OpenActive.Server.NET $ docker run --target builder -it --rm -p 5002:80 --name refimpl_sample refimpl
OpenActive.Server.NET $ docker build --target identity-server -t refimpl-id .
OpenActive.Server.NET $ docker run -it --rm -p 5002:80 --name refimpl-id_sample refimpl-id
OpenActive.Server.NET $ docker run -it --rm -p 5002:80 --name refimpl-id_sample refimpl-id
OpenActive.Server.NET $ docker run -it --rm -p 5002:80 --name refimpl-id_sample refimpl-id
OpenActive.Server.NET $ docker build --target identity-server -t refimpl .
OpenActive.Server.NET $ docker build  -t refimpl .
OpenActive.Server.NET $ docker run -it --rm -p 5001:80 --name refimpl_sample ghcr.io/openactive/reference.bookingsystem:0.14.12
OpenActive.Server.NET $ docker run -it --rm -p 5001:80 --name openactive_refimpl ghcr.io/openactive/reference.bookingsystem:0.14.12
OpenActive.Server.NET $ docker run -it --rm -p 5001:80 --name openactive_refimpl ghcr.io/openactive/reference.bookingsystem:0.14.12
OpenActive.Server.NET $ docker run -it --rm -p 5000:80 -p 5001:443 --name openactive_refimpl -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=5001 -e ASPNETCORE_ENVIRONMENT=no-auth ghcr.io/openactive/reference.bookingsystem:0.14.12
OpenActive.Server.NET $ docker run -it --rm -p 5001:443 --name openactive_refimpl -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=5001 -e ASPNETCORE_ENVIRONMENT=no-auth ghcr.io/openactive/reference.bookingsystem:0.14.12
OpenActive.Server.NET $ docker run -it --rm -p 5001:443 --name openactive_refimpl -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=5001 -e ASPNETCORE_ENVIRONMENT=no-auth ghcr.io/openactive/reference.bookingsystem:0.14.12
OpenActive.Server.NET $ docker run -it --rm -p 5001:443 --name openactive_refimpl -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=5001 -e ASPNETCORE_ENVIRONMENT=no-auth ghcr.io/openactive/reference.bookingsystem:0.14.12
OpenActive.Server.NET $ docker run -it --rm -p 5000:80 --name openactive_refimpl -e ASPNETCORE_ENVIRONMENT=no-auth ghcr.io/openactive/reference.bookingsystem:0.14.12
OpenActive.Server.NET $ docker run -it --rm -p 5001:80 --name openactive_refimpl -e ASPNETCORE_ENVIRONMENT=no-auth ghcr.io/openactive/reference.bookingsystem:0.14.12
OpenActive.Server.NET $ docker run -it --rm -p 5001:80 --name openactive_refimpl -e ASPNETCORE_ENVIRONMENT=no-auth ghcr.io/openactive/reference.bookingsystem:0.14.12
OpenActive.Server.NET $ docker run -it --rm -p 3000:3000 --name testsuite ghcr.io/openactive/test-suite:feature-docker simple-booking
OpenActive.Server.NET $ dotnet restore
OpenActive.Server.NET $ dotnet build ./Examples/BookingSystem.AspNetCore/BookingSystem.AspNetCore.csproj --configuration Release --no-restore
OpenActive.Server.NET $ dotnet publish ./Examples/BookingSystem.AspNetCore/BookingSystem.AspNetCore.csproj --configuration Release --no-build --output './web-app-package/BookingSystem.AspNetCore'
OpenActive.Server.NET $ cd web-app-package/BookingSystem.AspNetCore
BookingSystem.AspNetCore $ zip -r ../BookingSystem.AspNetCore.zip .
BookingSystem.AspNetCore $ az webapp deployment source config-zip --name IminOAReferenceImplementationRandomMode1  --resource-group EveryoneActiveBookingFacadeResourceGroup --src ../BookingSystem.AspNetCore.zip
BookingSystem.AspNetCore $ ls
BookingSystem.AspNetCore $ export ASPNETCORE_ENVIRONMENT=no-auth
BookingSystem.AspNetCore $ ls
BookingSystem.AspNetCore $ pwd
BookingSystem.AspNetCore $ cd ../..
OpenActive.Server.NET $ pwd
OpenActive.Server.NET $ dotnet run --no-launch-profile --project ./Examples/BookingSystem.AspNetCore/BookingSystem.AspNetCore.csproj --configuration Release --no-build &