Skip to content

Commit

Permalink
Update Docker development to use Dex
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed Nov 4, 2020
1 parent 38978af commit 77e1a95
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ RUN yum install -y centos-release-scl && \
ondemand-ruby \
ondemand-nodejs \
ondemand-passenger \
ondemand-nginx && \
ondemand-nginx \
ondemand-dex && \
yum clean all && rm -rf /var/cache/yum/*

RUN mkdir -p /opt/ood
RUN mkdir -p /var/www/ood/{apps,public,discover}
RUN mkdir -p /var/www/ood/apps/{sys,dev,usr}

COPY docker/launch-ood /opt/ood/launch
COPY mod_ood_proxy /opt/ood/mod_ood_proxy
COPY nginx_stage/ /opt/ood/nginx_stage
COPY ood-portal-generator /opt/ood/ood-portal-generator
Expand All @@ -48,6 +50,7 @@ RUN sed -i -r \
-e 's/^#listen_addr_port:.*/listen_addr_port: 8080/g' \
-e 's/^#port:.*/port: 8080/g' \
-e 's/^#servername:.*/servername: localhost/g' \
-e "s/^#lua_log_level:.*/lua_log_level: 'debug'/g" \
/etc/ood/config/ood_portal.yml

# make some misc directories & files
Expand All @@ -66,5 +69,5 @@ RUN sed -i 's#HTTPD24_HTTPD_SCLS_ENABLED=.*#HTTPD24_HTTPD_SCLS_ENABLED="httpd24
RUN groupadd ood
RUN useradd --create-home --gid ood ood

EXPOSE 80
CMD [ "/opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper", "-DFOREGROUND" ]
EXPOSE 8080
CMD [ "/opt/ood/launch" ]
6 changes: 6 additions & 0 deletions docker/launch-ood
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -e

runuser -u ondemand-dex /usr/sbin/ondemand-dex serve /etc/ood/dex/config.yaml &
/opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper -DFOREGROUND

0 comments on commit 77e1a95

Please sign in to comment.