/SAFE-BookStore

Working sample of a SAFE-Stack project with hot reloading

Primary LanguageF#The UnlicenseUnlicense

SAFE postgres migrations

This fork of the SAFE bookstore project shows:

  • How to run the app on kuberentes
  • How to setup Postgres storage
  • How to run Postgres migrations
  • How to run a regular cleaning job

Setup

  1. Install Docker desktop - includes k8s and a local docker repo
  2. In Docker desktop, enable kubernetes:
    Settings > enable > restart
  3. Install any SAFE bookstore requirments you don't already have.

Part0 - Creating a docker container

  1. Bundle the project
    ./build.cmd BundleClient
  2. Build the docker file
    docker build -t book-store .
  3. Deploy to docker
    docker run -d -p 80:8085 book-store
    Open http://localhost:80 to see it running.

Next steps

  1. Part1 - Creating a kubernetes deployment
  2. Part2 - Add Postgres storage to the app
  3. Part3 - Add Postgres migrations
  4. Part4 - Create a cleaning app
  5. Part5 - Create a kubernetes cron job to run the cleaner