ericberman / MyFlightbookWeb

The website and service for MyFlightbook
48 stars 18 forks source link

Docker Image #1208

Open TheDarkula opened 5 months ago

TheDarkula commented 5 months ago

First off, thank you so much for your work!

I would like to self-host an instance of MyFlightbook. I have started writing a Dockerfile, but I have not seen any build instructions. Can you please provide those to me?

I am happy to open a pull request with the CI/CD code to have the resultant image created in this repository once I get everything working :)

ericberman commented 5 months ago

I'm afraid I know nothing about Dockerfile, but instructions for building and setting up your own instance are in the readme Let me know if you have any questions about following these instructions. Do be aware that because the site uses google analytics, google maps, AWS, and so forth, you will need to set up your own IDs and accounts for these services, as well as your own email provider. If you aren't using things like Leon/CloudAhoy, then you don't need to set up IDs/accounts, but obviously that functionality won't then work.

TheDarkula commented 5 months ago

No worries!

From what I can tell, it needs some local file storage, and a mariadb/mysql database. What does it need AWS access for?

As far as the build, I was trying the following commands:

dotnet restore

and

dotnet publish -c Release -o out

When I run the second command, I get this error block:

0.292 MSBuild version 17.9.6+a4ecab324 for .NET                                                                                                                                                                                                                                                                               
0.563   Determining projects to restore...
0.740   Nothing to do. None of the projects specified contain packages to restore.
0.757 /usr/share/dotnet/sdk/8.0.203/Current/SolutionFile/ImportAfter/Microsoft.NET.Sdk.Solution.targets(36,5): warning NETSDK1194: The "--output" option isn't supported when building a solution. Specifying a solution-level output path results in all projects copying outputs to the same directory, which can lead to inconsistent builds. [/App/MyFlightbook.sln]
0.778 /App/MyFlightbook.Web/MyFlightbook.Web.csproj(3241,3): error MSB4019: The imported project "/usr/share/dotnet/sdk/8.0.203/Microsoft/VisualStudio/v17.0/WebApplications/Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "/usr/share/dotnet/sdk/8.0.203/Microsoft/VisualStudio/v17.0/WebApplications/Microsoft.WebApplication.targets" is correct, and that the file exists on disk.

Do you have a bash script or something similar that you use to build it?

ericberman commented 5 months ago

I use AWS to store full-sized images and videos (I store the thumbnails on the local file system for fast access and fast serving) and for processing of videos using Elastic transcoder. You can turn off AWS for images by setting UseAWSS3 to "no" in the localconfig table of the database, but videos will not work.

To build: load the solution in Visual Studio and use the build command. The error message above seems to summarize the issue, but I don't know enough about the details of solutions to know how to fix it. I run Build->Publish in Visual Studio when I need to update the website.

ericberman commented 5 months ago

And yes, you need local file storage and you need an email server.