Skip to content

Commit

Permalink
Added mysql for the IdP consent persistence and adminer to maintain t…
Browse files Browse the repository at this point in the history
…he db
  • Loading branch information
Daniel Bader committed Jul 10, 2017
1 parent 6cecc3a commit 7859fa5
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ vendor/pkg/
hack/integration-cli-on-swarm/integration-cli-on-swarm
config/idp/
config/ldap/
config/mysql/
haproxy/certs/
httpd-metadata/html/
httpd-metadata/
Expand Down
17 changes: 17 additions & 0 deletions defaultconf/docker-compose.yml.default
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,20 @@ services:
- '8443:8443'
volumes:
- './haproxy/:/usr/local/etc/haproxy/'

db:
image: mysql/mysql-server:5.7
volumes:
- './config/mysql:/var/lib/mysql'
- './mysql:/docker-entrypoint-initdb.d/'
restart: always
environment:
MYSQL_ROOT_PASSWORD: "toor"
MYSQL_DATABASE: "shib"
MYSQL_ROOT_HOST: "%"

adminer:
restart: always
image: adminer
ports:
- 89:808
1 change: 1 addition & 0 deletions init.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh
rm -r ./config/idp
rm -r ./config/ldap
rm -r ./config/mysql
rm ./docker-compose.yml
cp ./defaultconf/docker-compose.yml.default ./docker-compose.yml
rm ./haproxy/haproxy.cfg
Expand Down
10 changes: 10 additions & 0 deletions mysql/init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

USE shib;
CREATE TABLE storagerecords (
context varchar(255) NOT NULL,
id varchar(255) NOT NULL,
expires bigint DEFAULT NULL,
value text NOT NULL,
version bigint NOT NULL,
PRIMARY KEY (context, id)
);

0 comments on commit 7859fa5

Please sign in to comment.