1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

Updated Development Quickstart (markdown)

James Hillyerd
2020-07-25 12:55:14 -07:00
parent 6d6f5a8a7b
commit 8297966a41

@@ -83,4 +83,33 @@ npm run dev
If your browser does not open automatically, visit http://0.0.0.0:3000/ and select the Monitor tab. Follow the steps for _Terminal 2_ in the backend section to send some messages into Inbucket and confirm they appear in your browser.
The development server features hot code loading, so most changes you make to the Elm code will not require a browser refresh to be visible.
The development server features hot code loading, so most changes you make to the Elm code will not require a browser refresh to be visible.
# Docker container build
Build the container from the root `inbucket` directory:
```sh
docker build . -t inbucket/inbucket:latest
```
The `Dockerfile` uses a multi-stage build, the first container installs all the Go and Elm dependencies and builds Inbucket. The output of the build is then copied to a minimal container.
To test the docker container locally, you can use our helper script:
```sh
etc/docker/docker-run.sh
```
which is equivalent to the following docker command:
```sh
docker run -p 9000:9000 -p 2500:2500 -p 1100:1100 \
-v /tmp/inbucket/config:/config \
-v /tmp/inbucket/storage:/storage \
inbucket/inbucket
```
This forwards the default HTTP (9000), SMTP (2500) and POP3 (1100) ports into the container, and maps the storage volumes into `/tmp/inbucket`. Using the same default ports means you can still run `etc/swaks-tests/run-tests.sh` to populate it with email.
_Note:_ the log output from the Docker container defaults to a more verbose JSON format, this is intentional.