Developer Portal website.
This website is available as a Docker image here:
https://hub.docker.com/r/silintl/developer-portal/
We recommend using that as the FROM
in your own Dockerfile in your own
private repo, where you would COPY
into your own Docker image the files needed
by SimpleSAMLphp (if using SAML logins), your own
/data/public/img/logos/site-logo.png
, etc. Your Dockerfile should put the
SAML files into /tmp/ssp-overrides
, since the run.sh
script will copy from
there into the SimpleSAMLphp folders within the vendor
folder after installing
composer dependencies.
FROM silintl/developer-portal:1.3.4
# Make sure /data is available
RUN mkdir -p /data
# Copy in a custom vhost configuration (if necessary)
COPY build/vhost.conf /etc/apache2/sites-enabled/
# Copy the SimpleSAMLphp configuration files to a temporary location
COPY build/ssp-overrides /tmp/ssp-overrides
COPY build/logos /data/public/img/logos
WORKDIR /data
EXPOSE 80
# Record now as the build date/time (in a friendly format).
RUN date -u +"%B %-d, %Y, %-I:%M%P (%Z)" > /data/protected/data/version.txt
CMD ["/data/run.sh"]
The environment variables that this code uses are (for the purposes of
semantic versioning) considered this code's public interface. That is how
backwards-compability will be determined. If a new version of this code is
released that bumps the major version number (e.g. from 1.x.y
to 2.0.0
),
you will probably have to change something about what environment variables
you are providing when running this Docker image.
- Install VirtualBox
- Install Vagrant
- Clone the repository:
git clone git@github.com:silinternational/developer-portal.git
- Copy the
local.env.dist
file tolocal.env
, and update its contents appropriately. - Open a shell/terminal in the project's root folder.
- Launch environment with
vagrant up
- Modify your hosts file per the instructions below.
- Open browser and go to http://your-domain-name/
- If you need to make yourself an admin, login first (to make sure your user record exists), then go to http://your-domain-name/phpmyadmin. Login with the project's database credentials, find your user in the user table, and change the role to 'admin'.
SHOW_POPULAR_APIS
(boolean)
Whether to show the most popular APIs (based on the number of approved keys). If false, the fileapplication/protected/views/partials/home-lower-right.php
will be shown (which you can set the content of in thesite_text
table in the database).
Add one of the following lines to your hosts file (replacing
your-domain-name
with the domain name you want to use).
If using Vagrant:
192.168.33.10 your-domain-name
If using Docker directly (without Vagrant):
127.0.0.1 your-domain-name
If you try to access http://your-domain-name/phpmyadmin/ and get the following error...
phpMyAdmin - Error
Wrong permissions on configuration file, should not be world writable!
... then add the following line to the end of
vendor\phpmyadmin\phpmyadmin\config.inc.php
:
$cfg['CheckConfigurationPermissions'] = false;