Add .env docker explanation in readme

This commit is contained in:
Julien Nahum 2024-02-29 13:25:49 +01:00
parent 6118e6a1c0
commit 0b3fe43989
1 changed files with 4 additions and 3 deletions

View File

@ -69,8 +69,6 @@ It takes 1 minute to try out the builder for free. You'll have high availability
### Docker installation 🐳
> ⚠️ **Warning**: the Docker setup is currently not working as we're migrating the front-end to Nuxt. [Track progress here](https://github.com/JhumanJ/OpnForm/issues/283).
This can be built and run locally but is also hosted publicly on docker hub at `jhumanj/opnform` and is generally best run directly from there.
#### Running from docker hub
@ -81,6 +79,9 @@ docker run --name opnform -v $PWD/my-opnform-data:/persist -p 80:80 jhumanj/opnf
You should now be able to access the application by visiting http://localhost in a web browser.
> 👀 **Server Deployment**: If you are deploying OpnForm on a server (not locally), then you will [need to use 2 .env files](https://github.com/JhumanJ/opnform?tab=readme-ov-file#using-custom-env-files) to configure the app URLs (`APP_URL` in `.env` and both `NUXT_PUBLIC_APP_URL` & `NUXT_PUBLIC_API_BASE` in `client/.env`).
The `-v` argument creates a local directory called `my-opnform-data` which will store your database and files so that your work is not lost when you restart the container.
The `--name` argument names the running container so that you can refer back to it later, with e.g. `docker stop opnform`. You can use any name you'd like.