In order to get the project running locally for development here are a few steps:
cd Ghost.Datadotnet ef database updateor~/.dotnet/tools/dotnet-ef database update
sudo apt-get update && sudo apt-get install -y ffmpegcd Ghost.Webdotnet watch run --urls=http://localhost:5120
docker build -t ghost-media-dev -f Dockerfile.dev .
docker run -d \
-p 5120:5120 \
-v $(pwd):/app \
-v $(pwd)/assets:/media/assets \
-e DATABASE_PATH=/app/data/Ghost.db \
--name ghost-media-dev ghost-media-devcd Ghost.Web.Reactnpm inpm start
- `cd Ghost.Web
docker build -t ghost-media-react -f Dockerfile .same as production buildnpm i
docker run -d \
-p 3000:3000 \
-v $(pwd):/app
-e VITE_APP_SERVER_URL=http://192.168.178.27:5120 \
--name ghost-media-react-dev ghost-media-reactThis container is used to update the database if there are any migrations that need to be run on the data
-
docker image rm ghost-updater -
docker build -t ghost-updater -f Ghost.Data/Dockerfile Ghost.Data
docker run --rm \
-v $(pwd)/data:/data \
-e DATABASE_PATH=/data/Ghost.db \
ghost-updaterThis container uses the database that we created or updated with the Ghost Data container to run the API
-
docker build -t ghost-media -f Dockerfile . -
You can mount as many volumes inside of the
mediafolder in the container. You will use this folder to setup your media. You can also replace theDATABASE_PATHwith whatever you need as long as it is mounted in the volume.
docker run -d \
-p 8080:80 \
-e DATABASE_PATH=/data/Ghost.db \
-v $(pwd)/assets:/media/assets \
-v $(pwd)/data:/data \
--name ghost-media ghost-mediaThis container is the frontend container that connects to the API
-
docker build -t ghost-media-react -f Ghost.Web/Dockerfile Ghost.Web -
You can replace the
VITE_APP_SERVER_URLwith the the IP address of the running server
docker run -d \
-p 3001:3000 \
-e VITE_APP_SERVER_URL=http://localhost:8080 \
--name ghost-media-react ghost-media-reactCurrently this project is in MVP state so there is no fancy library path picker. To add a library to your application
- Make sure the folder is mounted
- Go to the
Librarytab and clickAdd Library - Pick a name and add as many paths of the library as you wish
- Finish by clicking
Create Library - You will be redirected to the
Librarytab again with your newly created library - Click the options on the library and select
Syncto search for any media within the library folders. (this may take a while depending on the size of your library) - Navigate to home and you should see your media and images start to load and be generated.
There is no functionality yet to add a user from the frontend yet soo you will have to post to an endpoint of the API in order to create a user for the time being.
POST http://localhost:5120/api/user
Content-Type: application/json
{
"username": "someUsername",
"password": "somePassword"
}This functionality is still very basic and every time the site loads for the first time you will have to go to the settings section and select the user which you want to be "logged in" as. There are plans to expand on this in the future at the moment the focus is more on the video management side of things.