From d483aa120bb878c74c304ca65199e9410d7a018c Mon Sep 17 00:00:00 2001 From: Simon Ungar Felding <45149055+simonfelding@users.noreply.github.com> Date: Thu, 12 Jun 2025 18:45:25 +0200 Subject: [PATCH] there we go. --- README.md | 9 +++++++-- build/entrypoint.sh | 2 ++ docker-compose.yml | 9 +++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2f4577b..15e6e16 100644 --- a/README.md +++ b/README.md @@ -37,12 +37,17 @@ To initialize and add account to the bridge, run the following steps: ``` docker run -it -v protonmail:/root shenxn/protonmail-bridge ``` +2. When you are done, press `CTRL+P` followed by `CTRL+Q`. This detaches the container from your terminal and keeps it running in the background. ## Setting up the bridge If you have not set up an account, you need to do the folliwing steps in the protonmail-bridge CLI interface: -1. Use the `add` command to add your ProtonMail account. You will be prompted to enter your ProtonMail username and password. -2. After adding your account, use the `info` command to see the configuration information (username and password). +1. Connect to the running container by getting it's name using `docker ps` and then running: +``` +docker attach +``` +2. Use the `add` command to add your ProtonMail account. You will be prompted to enter your ProtonMail username and password. +3. After adding your account, use the `info` command to see the configuration information (username and password). ## Security diff --git a/build/entrypoint.sh b/build/entrypoint.sh index 32a0453..e80f31e 100644 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -64,3 +64,5 @@ jq '.Settings.AutoUpdate = (env.PROTONMAIL_AutoUpdate | if . == "true" then true # Start protonmail echo "Starting ProtonMail Bridge. Connect to the CLI with `docker exec -it ` and type 'help' for instructions." /protonmail/proton-bridge --cli $@ +echo "ProtonMail bridge stopped. waiting 30 seconds before exiting in order to preserve the logs." +sleep 30 # so we have time to read the logs in case of a crash loop \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index fa91e7d..cdf95da 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,14 +1,19 @@ -version: '2.1' - services: protonmail-bridge: image: shenxn/protonmail-bridge + container_name: protonmail-bridge ports: - 1025:25/tcp - 1143:143/tcp restart: unless-stopped volumes: - protonmail:/root + stdin_open: true + tty: true + logging: + options: + max-size: "1m" + max-file: "10" volumes: protonmail: name: protonmail