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
You can keep the `Dockerfile` and `.dockerignore` in the root if you prefer,
151
151
just make sure to remove the move step from the `.github/workflows/deploy.yml`.
152
+
153
+
## Deploying locally using docker/podman
154
+
If you'd like to deploy locally by building a docker container image, you definitely can. For that you need to make some minimal changes to the Dockerfile located at other/Dockerfile. Remove everything from the line that says (#prepare for litefs) in "other/Dockerfile" till the end of file and swap with the contents below.
155
+
156
+
```
157
+
# prepare for litefs
158
+
VOLUME /litefs
159
+
ADD . .
160
+
161
+
EXPOSE ${PORT}
162
+
ENTRYPOINT ["/myapp/other/docker-entry-point.sh"]
163
+
```
164
+
165
+
There are 2 things that we are doing here.
166
+
1. docker volume is used to swap out the fly.io litefs mount.
167
+
2. Docker ENTRYPOINT is used to execute some commands upon launching of the docker container
168
+
169
+
Create a file at other/docker-entry-point.sh with the contents below.
mkdir ~/litefs # mountpoint for your sqlite databases
184
+
docker run -d -p 8081:8081 -e SESSION_SECRET='somesecret' -e INTERNAL_COMMAND_TOKEN='somesecret' -e HONEYPOT_SECRET='somesecret' -e FLY='false' -v ~/litefs:/litefs epic-stack # Runs the docker container. http://localhost:8081 should now point to your docker instance. ~/litefs directory has the sqlite databases
0 commit comments