You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NPM Scripts appended with `:prod` are production scripts and those without anything appended are scripts to be used in development.
12
12
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
+
13
15
### TODOS
14
16
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.)
16
20
17
21
### Development Side
18
22
@@ -28,6 +32,14 @@ NPM Scripts appended with `:prod` are production scripts and those without anyth
28
32
3.`make stop-production` to stop the Docker Container
29
33
4.`docker system prune -f && docker builder prune -f` to delete all images & container
30
34
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
+
31
43
### SQLite WAL Mode Caveats
32
44
33
45
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:
69
81
70
82
1. Use `/etc/easypanel/projects/[project]/[services]/volumes/data/` as `Data Path`
71
83
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