Web application to administer the cinema program and film archive of the Kino im Blauen
Salon.
Powered by Remix and PayloadCMS.
install the dependencies and generate the types:
pnpm i
pnpm generate:types
Start the app in the dev environment:
pnpm dev
OR:
docker compose up -d
First, build your app for production:
pnpm build
Then run the app in production mode:
pnpm start
- Create an account on Fly.io
- Install the Fly CLI
- Run
flyctl login
and follow the prompts - Run
flyctl launch
in the project root - Enter
y
tocopy its configuration to the new app
- Enter
N
totweak these settings
- The app should deploy now
- Now you can set up the Github Action
- Create a deploy token by running
flyctl tokens create deploy
- Create a new secret on your repository called
FLY_API_TOKEN
with your deploy token atSettings > Secrets and Variables > Actions
Media files should be stored in a S3 bucket. Create a bucket at Cloudflare, AWS, or any other provider and fill the required environment variables in the .env file. When using Cloudflare R2, specify S3_REGION=auto
To seed the database, run the following command in the docker container of the app:
pnpm seed
# in development use pnpm seed:dev
It will exexute the script cms/seed/index.ts
which does:
- fill the countries collection with data from the restcountries.com api
To apply database migrations, run the following command in the docker container of the app:
pnpm payload migrate
# development:
pnpm payload:dev migrate
# migrate down:
pnpm payload migrate:down
pnpm payload:dev migrate:create <name>
If you need to generate the image sizes again, you can do that with the following command:
pnpm generate:images
Make sure you have an .env
file with PAYLOAD_SECRET
and MONGO_URL
defined.
If you are using docker, just call the command inside the apps docker container.