docker-example: update executable and README (#1499)
This commit is contained in:
parent
69b4dc9fce
commit
be617a8dc9
@ -43,7 +43,7 @@ COPY --chown=reflex --from=init /app/ /app/
|
|||||||
USER reflex
|
USER reflex
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
CMD ["rx","run" , "--env", "prod"]
|
CMD ["reflex", "run" , "--env", "prod"]
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
@ -8,15 +8,14 @@ The `requirements.txt` includes the reflex package which is need to install Refl
|
|||||||
|
|
||||||
## Customize Reflex Config
|
## Customize Reflex Config
|
||||||
|
|
||||||
The `rxconfig.py` includes the configuration of your Reflex service. Edit the file like the following configuration. If you want to use a custom database you can set the endpoint in this file.
|
The `rxconfig.py` includes the configuration of your Reflex service. Edit the file like the following configuration. If you want to use a custom database you can set the endpoint in this file. Ensure that `api_url` points to the publicly accessible hostname where the container will be running.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
|
|
||||||
config = rx.Config(
|
config = rx.Config(
|
||||||
app_name="app",
|
app_name="app",
|
||||||
api_url="0.0.0.0:8000",
|
api_url="http://app.example.com:8000",
|
||||||
bun_path="/app/.bun/bin/bun",
|
|
||||||
db_url="sqlite:///reflex.db",
|
db_url="sqlite:///reflex.db",
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
@ -34,5 +33,5 @@ docker build -t reflex-project:latest .
|
|||||||
Finally, you can start your Reflex container service as follows:
|
Finally, you can start your Reflex container service as follows:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -d -p 3000:3000 -p 8000:8000 --name reflex reflex-project:latest
|
docker run -d -p 3000:3000 -p 8000:8000 --name app reflex-project:latest
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user