mirror of
https://github.com/PurpleComputing/scim-examples.git
synced 2026-02-14 02:42:08 +00:00
Merge pull request #7 from 1Password/rf/docker-compose-on-startup
Added instructions for what would need to be done to start op-scim on startup via docker-compose
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Deploying the 1Password SCIM Bridge using Docker Compose
|
||||
|
||||
This example describes the simplest method of deploying the 1Password SCIM bridge, using Docker Compose. These instructions require a remote Docker host be set up and configured to be accessed by the Docker CLI.
|
||||
This example describes the simplest method of deploying the 1Password SCIM bridge, using Docker Compose. These instructions require a remote Docker host be set up and configured to be accessed by the Docker CLI.
|
||||
|
||||
Note that this deployment strategy is very useful for testing, but it is not reccomended for use in a production environment. The scimsession file is passed into the container via an environment variable, which is less secure than Docker Swarm secrets or Kubernetes secrets, both of which are supported, and reccomended.
|
||||
|
||||
@@ -29,4 +29,15 @@ Next, edit `docker-compose.yml`, replacing `{YOUR-DOMAIN-HERE}` with the domain
|
||||
|
||||
Running `docker-compose up --build` will now create a container from the `1password/scim` image. A redis container will also be started automatically to be used by the SCIM bridge. _After the DNS record has been propogated_, you can continue setting up your IdP with the SCIM bridge Administration Guide while monitoring the logs from the bridge on your local machine.
|
||||
|
||||
Once you have tested the configuration, the bridge can be exited using ctrl/cmd-c, and restarted in daemon mode using `docker-compose up -d, or deployed for production use with Docker Swarm or Kubernetes. You can access logs using `docker-compose logs` at any point in the future.
|
||||
Once you have tested the configuration, the bridge can be exited using ctrl/cmd-c, and restarted in daemon mode using `docker-compose up -d, or deployed for production use with Docker Swarm or Kubernetes. You can access logs using `docker-compose logs` at any point in the future.
|
||||
|
||||
## Automatically starting the SCIM bridge upon startup
|
||||
|
||||
In order to automatically launch the 1Password SCIM bridge upon startup when using docker-compose you'll need to automatically start the Docker daemon, then start op-scim.
|
||||
|
||||
### Systemd
|
||||
|
||||
1. Install the service file for op-scim. A [sample](op-scim.service) is provided and you'll need to change the path.
|
||||
2. Reload systemd: `systemctl daemon-reload`
|
||||
3. Enable the op-scim service: `systemctl enable op-scim`
|
||||
|
||||
|
||||
17
docker-compose/op-scim.service
Normal file
17
docker-compose/op-scim.service
Normal file
@@ -0,0 +1,17 @@
|
||||
#/etc/systemd/system/op-scim.service
|
||||
[Unit]
|
||||
Description=1Password SCIM bridge
|
||||
Requires=docker.service
|
||||
After=docker.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
RemainAfterExit=yes
|
||||
WorkingDirectory=/path/to/directory/containing/docker-compose.yml
|
||||
ExecStart=/usr/local/bin/docker-compose up -d
|
||||
ExecStop=/usr/local/bin/docker-compose down
|
||||
TimeoutStartSec=0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user