A server for Cavity Android app to make backups of user's data
Make sure traefik is running. Install supabase CLI.
cd Cavity-backend
supabase start
docker-compose up -d
You can now acces the project at https://cavity.njk.localhost Supabase UI URL is displayed when running supabase start
Make sure docker compose variables SUPABASE_URL
& SUPABASE_ANON_KEY
are filled with the values given by supabase start
(Most of the time, http://172.17.0.1:54321 works the best)
You can use the api while serving it with a mobile device for example. You first need to find out your ip on your local network:
hostname -I | awk '{print $1}'
For Android, update network_security_config file to allow unsecured http to run on this ip:
<network-security-config>
<base-config>
...
</base-config>
<!-- Test locally -->
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">[ip]</domain>
</domain-config>
</network-security-config>
Access the app from http://ip:5000
If you're not using a tag but a branch name (or latest), latest code fetching by Deno can be skipped because the URL stay the same. To ensure deno is not using cache on a modified dependance, run:
docker-compose build --no-cache
This project uses CI/CD. Workflows are triggered when pushing a tag, and deploy code to Deno Deploy.
Things to do to prepare a release:
- Update sentry's release property to match upcoming
version name
- Merge target code into master branch
- Create and push a tag named
version name
- (May not be needed) Go to deno deploy, and promote the deployment to production
## Sentry Checkout (issue)[getsentry/sentry-javascript#10521] Sentry is configured for this project. Note however that it would not work in dev mode, nor in a dev container
docker-compose up -d
docker-compose exec web deno test --allow-env
# Add postgrsql apt repo
sudo apt install -y postgresql-common
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
# Install pg dump
sudo apt install -y postgresql-client-16
pg_dump -h aws-0-eu-central-1.pooler.supabase.com -p 6543 -d postgres -U postgres.pyjhfmsgwwdcdcmyiffc > ./backup.sql
To restore it use:
pg_restore -d <DB connection string> ./backup.sql