Skip to content

Commit 5af8fa4

Browse files
committed
update README with install instructions
1 parent 2859198 commit 5af8fa4

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ Create `.env.development` & `.env.production` using `.env.example` format.
1010
1111
NPM Scripts appended with `:prod` are production scripts and those without anything appended are scripts to be used in development.
1212

13+
Use `/data` in `.env.production` like `SQLITE_DATABASE_PATH=/data/users.production.sqlite` & setup Cloudflare environment variables to have Database Backups using Litestream.
14+
1315
### TODOS
1416

15-
- [ ] Get `development/Dockerfile` to support HMR (Currently, Dockerfile in development does not work)
17+
- [ ] Get `development/Dockerfile` to support HMR (Currently, Dockerfile in development does not work but `pnpm dev` is much better anyways)
18+
19+
> Note: If you need Redis, then only setup Redis in Docker & use local development environment for HMR as setting docker in development is very tedious & useless (at least it was in my case.)
1620
1721
### Development Side
1822

@@ -28,6 +32,14 @@ NPM Scripts appended with `:prod` are production scripts and those without anyth
2832
3. `make stop-production` to stop the Docker Container
2933
4. `docker system prune -f && docker builder prune -f` to delete all images & container
3034

35+
### Hosting on Easypanel
36+
37+
1. Go to `Environment` & paste `.env.production` into `Environment Variables` & check `Create .env file` to create `.env` file.
38+
2. Change port to `3001` as specified in `Dockerfile`. Go into `Domains`, click on `Edit` button, change `Internal Port` to `3001`. Make sure to use Custom Domain as Easypanel currently isn't working on `*.easypanel.host` domains.
39+
3. Go to `Source`, add `Github` credentials, choose `Dockerfile` & paste `docker/production/Dockerfile` as the location.
40+
4. Enable `Auto Deploy` by checking the box besides `Destroy` (delete icon) button.
41+
5. Finally, click on `Deploy` to launch it.
42+
3143
### SQLite WAL Mode Caveats
3244

3345
I noticed SQLite WAL Mode on Docker Container doesn't work too well & results in data loss when the `*.sqlite` file is opened in a database browser like `SQLite Database` Desktop App.
@@ -69,3 +81,9 @@ Hypothesis:
6981

7082
1. Use `/etc/easypanel/projects/[project]/[services]/volumes/data/` as `Data Path`
7183
2. Use `/data` as directory
84+
85+
#### Easypanel Port fix
86+
87+
I used `Domains > Port` & added `3001` as internal port on my custom domain & it worked. It didn't work on `*.easypanel.host` domain for some reason.
88+
89+
I had `Mounts > Add Volume Mount` set to `data` as `Name` & `/data` as `Mount Path` which I don't think is needed if I use `VOLUMES ["/data"]` in `Dockerfile`.

0 commit comments

Comments
 (0)