Fullstack app container using Fastapi, Svelte, Postgres, Redis, and Docker.
- Docker
- Docker-compose
git clone https://github.com/olaracode/fast-svelte-docker2. Then set up your environment variables, for easier maintainability we use a single .env file for all services.
cp .env.example .env-
- Set the
POSTGRES_USER,POSTGRES_PASSWORD,POSTGRES_DBto your desired values.
- Set the
-
- Generate a KEY and REFRESH_KEY
Both the
KEYandREFRESH_KEYare used to sign the JWT tokens, you can generate them using the following command.We use the simple
opensslcommand to generate the keys.openssl rand -hex 32
docker-compose up --build-
DB Migrations
docker-compose exec web alembic revision --autogenerate -
DB Upgrade
docker-compose exec web alembic upgrade head
docker-compose up --builddocker-compose exec <service_name> bashdocker-compose down -vdocker-compose up --builddocker-compose up --build -Vdocker-compose up --force-recreate