Extract auth and service out
Turn internal auth app + auth api here into a single npm module to use per app.
Using sqlite would be cool but im not sure how it works with statelessness of clustering/docker.
A method to sync the data across other known ips etc.
Some type "storage" option for how user data is persisted, like s3, volume, file, redis.
Essentially requires 2 things:
- A method of storage/persistence.
- A method of syncing if beyond a single instance and allow user to provide service discovery.
Maybe optimize the auth app to work as an attachable docker service that just requires including the docker image and include examples of how to store the data. Including backup and restore instructions. Examples being DB docker images.
mongodb:
image: mongo
restart: on-failure
environment:
MONGO_INITDB_DATABASE: "${MONGO_DB_NAME:-react}"
volumes:
- temp_data:/data/db
A super basic docker auth app
auth:
image: auth
restart: on-failure
environment:
DB_TYPE: [redis, mongo, sqlite]
STORAGE_OPTION: [s3, volume, file]
DATABASE_NAME: "${DB_NAME:-auth}"
ROOT_PAGE_PATH: "/app-auth"
REDIRECT_TO: ["/home", "previous"]
volumes:
- temp_data:/data/db