Skip to content

A Docker container for running Margarita, a web front-end for Reposado.

Notifications You must be signed in to change notification settings

MScottBlake/docker-margarita

Repository files navigation

docker-margarita

Build Status GitHub Stars Docker Stars Docker Pulls

A Docker container for running Margarita, a web front-end for Reposado.

Note

If you make a change and the blue bar never stops scrolling, you likely have a permissions problems. This could occur if you perform a repo_sync and it creates new files. Those files will not have the proper permissions. To fix this, run the following commands.

docker exec margarita chgrp -R www-data /reposado
docker exec margarita chmod -R g+wr /reposado

Usage Examples

Example #1 - Basic

docker run --name margarita -d -p 8089:8089 mscottblake/margarita

Example #2 - Using port 80

docker run --name margarita -d -p 80:8089 mscottblake/margarita

Example #3 - Custom preferences.plist

By default, LocalCatalogURLBase is empty, so the updates aren't really being downloaded, just their metadata. To host the updates on-site, you need to specify a value for this variable. Any optional keys (AppleCatalogURLs, PreferredLocalizations, etc.) need to be loaded in this manner as well.

docker run --name margarita -d -p 8089:8089 -v /path/to/reposado/preferences.plist:/margarita/preferences.plist mscottblake/margarita

Example #4 - Link to an existing reposado container

This example assumes the existence of a container named reposado from mscottblake/reposado.

docker run --name margarita --volumes-from reposado -d -p 8089:8089 -v /path/to/reposado/preferences.plist:/margarita/preferences.plist mscottblake/margarita

Example #5 - Add Basic Authentication

Authentication can be added by overriding /extras.conf with the -v flag. Contents of extras.conf:

<Location />
  AuthType Basic
  AuthName "Authentication Required"
  AuthUserFile "/margarita/.htpasswd"
  Require valid-user
</Location>
docker run --name margarita -d -p 8089:8089 -v /path/to/extras.conf:/extras.conf -v /path/to/valid-users:/margarita/.htpasswd mscottblake/margarita

Alternatively, the .htpasswd file could be created once the container has been created.

docker run --name margarita -d -p 8089:8089 -v /path/to/extras.conf:/extras.conf mscottblake/margarita

docker exec -it margarita htpasswd -c /margarita/.htpasswd USERNAME_1

docker exec -it margarita htpasswd /margarita/.htpasswd USERNAME_2

More examples of authentication blocks can be found in GitHub

Example #6 - Enabling SSL

SSL can be added by overriding /extras.conf with the -v flag. Contents of extras.conf:

SSLEngine on
SSLCertificateKeyFile /ssl/server.key
SSLCertificateFile /ssl/yourDomainName.crt

Make sure to include the certificate files.

docker run --name margarita -d -p 443:8089 -v /path/to/extras.conf:/extras.conf -v /path/to/server.key:/ssl/server.key -v /path/to/ssl/yourDomainName.crt:/ssl/yourDomainName.crt mscottblake/margarita