Compare commits
4 Commits
master
...
improve-do
Author | SHA1 | Date | |
---|---|---|---|
42dab34d17 | |||
31662a4cf2 | |||
93ca38c9c7 | |||
586f5822b5 |
1
.env
1
.env
@ -2,3 +2,4 @@ DATABASE_PASSWORD=CHANGE_ME
|
|||||||
#DATABASE_KEYFILE=
|
#DATABASE_KEYFILE=
|
||||||
BW_PATH=/usr/local/bin/bw
|
BW_PATH=/usr/local/bin/bw
|
||||||
DATABASE_PATH=/exports/bitwarden-export.kdbx
|
DATABASE_PATH=/exports/bitwarden-export.kdbx
|
||||||
|
BITWARDEN_URL=https://bitwarden.com
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM python:3.11.0-slim-bullseye
|
FROM python:3.11-slim-bookworm
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends wget unzip && \
|
apt-get install -y --no-install-recommends wget unzip && \
|
||||||
|
@ -8,6 +8,7 @@ It uses official [bitwarden-cli](https://bitwarden.com/help/article/cli/) client
|
|||||||
- Clone this repository
|
- Clone this repository
|
||||||
- Edit `.env` file
|
- Edit `.env` file
|
||||||
- ⚠️ make sure to set your own `DATABASE_PASSWORD` - used as password for KeePass database
|
- ⚠️ make sure to set your own `DATABASE_PASSWORD` - used as password for KeePass database
|
||||||
|
- If you are using a custom Bitwarden instance, set the URL in `BITWARDEN_URL`
|
||||||
- Run
|
- Run
|
||||||
```
|
```
|
||||||
docker-compose run bitwarden-to-keepass
|
docker-compose run bitwarden-to-keepass
|
||||||
@ -30,4 +31,4 @@ source .venv/bin/activate
|
|||||||
- Run
|
- Run
|
||||||
```
|
```
|
||||||
python3 bitwarden-to-keepass.py --bw-session BW_SESSION --database-path DATABASE_PATH --database-password DATABASE_PASSWORD [--database-keyfile DATABASE_KEYFILE] [--bw-path BW_PATH]
|
python3 bitwarden-to-keepass.py --bw-session BW_SESSION --database-path DATABASE_PATH --database-password DATABASE_PASSWORD [--database-keyfile DATABASE_KEYFILE] [--bw-path BW_PATH]
|
||||||
```
|
```
|
||||||
|
@ -3,7 +3,7 @@ services:
|
|||||||
bitwarden-to-keepass:
|
bitwarden-to-keepass:
|
||||||
build: .
|
build: .
|
||||||
command: >
|
command: >
|
||||||
bash -c 'export BW_SESSION=`$BW_PATH login --raw || $BW_PATH unlock --raw`
|
bash -c '$BW_PATH config server $BITWARDEN_URL && export BW_SESSION=`$BW_PATH login --raw || $BW_PATH unlock --raw`
|
||||||
&& $BW_PATH sync
|
&& $BW_PATH sync
|
||||||
&& python3 bitwarden-to-keepass.py
|
&& python3 bitwarden-to-keepass.py
|
||||||
&& $BW_PATH lock'
|
&& $BW_PATH lock'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user