eddible
(Edd ABM)
June 11, 2018, 12:58pm
1
Hi all,
I have a Ubuntu server which I’m running multiple docker images/containers on (running things like Plex and NZBget etc.) and I’d like to run bitwarden alongside them. Problem is, the installer creates a brand new docker-compose file which seems to conflict with the one I’m already using - it wants to run the --remove-orphans tag to clean them up which I, of course, don’t want to do. Is there a way to install bitwarden so I can use it alongside my existing docker setup? It seems the installer works on the assumption that you’ve never used docker-compose before?
1 Like
Mart124
(Mart124)
July 25, 2018, 3:34pm
2
I’ve pushed a fix in the following PR which should help once merged :
master ← Mart124:mssql
opened 03:53PM - 01 Jun 18 UTC
Hi,
This PR allows to better handle update operations.
1.
It prevents use… rs from being able to connect to the application when it has just been updated, but before database update completed.
For this, after the application has been switched off and updated, only the mssql container is restarted, for the database to be updated. Then, the other containers are restarted.
2.
Also, update procedure now properly waits for database to be up and running before proceeding, thus avoiding error like this :
```
Database is in script upgrade mode. Trying again (attempt #3)...
Migrating database.
Unhandled Exception: System.Data.SqlClient.SqlException: Login failed for user 'sa'. Reason: Server is in script upgrade mode. Only administrator can connect at this time.
at Bit.Setup.Program.MigrateDatabase(Int32 attempt) in /Users/kyle/Projects/bitwarden/core/util/Setup/Program.cs:line 284
at Bit.Setup.Program.MigrateDatabase(Int32 attempt) in /Users/kyle/Projects/bitwarden/core/util/Setup/Program.cs:line 280
at Bit.Setup.Program.MigrateDatabase(Int32 attempt) in /Users/kyle/Projects/bitwarden/core/util/Setup/Program.cs:line 280
at Bit.Setup.Program.Main(String[] args) in /Users/kyle/Projects/bitwarden/core/util/Setup/Program.cs:line 57
```
Start procedure also properly waits for database to be up and running before starting the other containers.
Time for database to come online is also printed, for info purpose.
3.
While here, as we already have an `updatedb` operation which update the database only, let's add an `updateapp` operation which update the application only. We may require it if we want to update the application without restarting it just after (which update does). Of course it then requires to proceed with `updatedb` and `start`.
4.
Pruning is now done on Bitwarden images only, now that images have a label (#305).
This solves [this community bug report](http://community.bitwarden.com/t/installing-bitwarden-into-an-existing-docker-server/1172).
I also added [a note](https://github.com/bitwarden/core/pull/302/files#diff-dcd8a73331aba627440c247763086b99R139) that we could perhaps add `-a` to `docker image prune` to recover disk space during "automatic" update (`update` operation). Perhaps this was the intended behavior ?
5.
Finally, merging this PR would possibly require a little doc update :
https://help.bitwarden.com/article/install-on-premise/
Proper installation procedure would now rather be :
```
./bitwarden.sh install
./bitwarden.sh updatedb
./bitwarden.sh start
```
Thank you 👍