Skip to content

Commit

Permalink
Improve Docker Compose documentation and example (#95)
Browse files Browse the repository at this point in the history
- Clean up the example `docker-compose.yml` file by removing unnecessary
configuration/comments and add missing volume declaration
- Update the project README.md with instructions on how to use the
project with Docker Compose
  • Loading branch information
mark-monteiro authored Feb 8, 2024
1 parent 2ac707c commit 9d2bf07
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ To initialize and add account to the bridge, run the following command.
docker run --rm -it -v protonmail:/root shenxn/protonmail-bridge init
```

Wait for the bridge to startup, use `login` command and follow the instructions to add your account into the bridge. Then use `info` to see the configuration information (username and password). After that, use `exit` to exit the bridge. You may need `CTRL+C` to exit the docker entirely.
If you want to use Docker Compose instead, you can create a copy of the provided example [docker-compose.yml](docker-compose.yml) file, modify it to suit your needs, and then run the following command:

```
docker compose run protonmail-bridge init
```

Wait for the bridge to startup, then you will see a prompt appear for [Proton Mail Bridge interactive shell](https://proton.me/support/bridge-cli-guide). Use the `login` command and follow the instructions to add your account into the bridge. Then use `info` to see the configuration information (username and password). After that, use `exit` to exit the bridge. You may need `CTRL+C` to exit the docker entirely.

## Run

Expand All @@ -47,6 +53,12 @@ To run the container, use the following command.
docker run -d --name=protonmail-bridge -v protonmail:/root -p 1025:25/tcp -p 1143:143/tcp --restart=unless-stopped shenxn/protonmail-bridge
```

Or, if using Docker Compose, use the following command.

```
docker compose up -d
```

## Kubernetes

If you want to run this image in a Kubernetes environment. You can use the [Helm](https://helm.sh/) chart (https://github.com/k8s-at-home/charts/tree/master/charts/stable/protonmail-bridge) created by [@Eagleman7](https://github.com/Eagleman7). More details can be found in [#23](https://github.com/shenxn/protonmail-bridge-docker/issues/23).
Expand Down
8 changes: 2 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@ version: '2.1'
services:
protonmail-bridge:
image: shenxn/protonmail-bridge
# build:
# context: ./build
# dockerfile: Dockerfile
container_name: pm_bridge
ports:
- 1025:25/tcp
- 1143:143/tcp
restart: unless-stopped
stdin_open: true
tty: true
volumes:
- protonmail:/root
volumes:
protonmail:
name: protonmail

0 comments on commit 9d2bf07

Please sign in to comment.