-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Dockerfile and Fly.io deployment instructions #9
base: master
Are you sure you want to change the base?
Conversation
RUN dotnet sln list \ | ||
| tail -n +3 \ | ||
| xargs -I {} sh -c \ | ||
'target="{}"; dir="${target%/*}"; file="${target##*/}"; mkdir -p -- "$dir"; mv -- "$file" "$target"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taken from https://stackoverflow.com/a/65390923, this is a hacky thing you need to do to move each of the .csproj files to the proper directory in the docker image. A little annoying but better than hardcoding it because if anything about the project structure is changed (new project added, project renamed, etc) it won't require any changes to the Dockerfile
I'd not describe the GitHub Container Registry (GHCR) as an Though from the perspective of the
The focus is on building and providing docker images automatically on code changes, that are ready to use for all kind of different docker use cases (locally, on a server, on an embedded device, in a cloud, whatever). The I'm no expert with flyctl launch --image ghcr.io/istador/smo-online-server |
Ah yeah iffy wording on my part, I more just meant "as opposed to building the image locally", but I suppose just calling it "a registry" would have been better.
My focus on this PR compared to #6 was more about the documentation rather than the possibilities of what you could do with the image. The main goal of this PR was to teach a relatively easy way to deploy the server, and yes it would definitely be even easier if using a pre-built image from GHCR.
I did just test |
Better commands
Adds a Dockerfile and instructions for deploying to the free tier of Fly.io for anybody who wants to run the server but isn't familiar with the operations-side of software development.
I saw that #6 also adds a Dockerfile, but that PR seems more focused on 1. pushing an image to an external registry 2. running that pushed image locally. This PR is intended for people who maybe aren't comfortable or knowledgable about provisioning their own server and setting everything up manually, but could follow the doc I've added to run the server for free on a platform that will keep it running automatically and give easy access to server logs. There definitely is some overlap between this PR and #6 though, so feel free to combine this with that one or close this if it's out of scope.