GithubHelp home page GithubHelp logo

isabella232 / developer-portal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from silinternational/developer-portal

0.0 0.0 0.0 6.19 MB

Developer Portal website

License: MIT License

PHP 97.16% Batchfile 0.02% CSS 1.61% JavaScript 0.87% Shell 0.18% Makefile 0.07% Dockerfile 0.08%

developer-portal's Introduction

Developer Portal

Developer Portal website.

Docker Image

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.

Example Dockerfile using this as the FROM

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"]

A Note About Semantic Versioning

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.

Environment / Project Setup

  1. Install VirtualBox
  2. Install Vagrant
  3. Clone the repository:
    git clone [email protected]:silinternational/developer-portal.git
  4. Copy the local.env.dist file to local.env, and update its contents appropriately.
  5. Open a shell/terminal in the project's root folder.
  6. Launch environment with vagrant up
  7. Modify your hosts file per the instructions below.
  8. Open browser and go to http://your-domain-name/
  9. 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'.

local.env reference

  • SHOW_POPULAR_APIS (boolean)
    Whether to show the most popular APIs (based on the number of approved keys). If false, the file application/protected/views/partials/home-lower-right.php will be shown (which you can set the content of in the site_text table in the database).

Hosts file modification for running Developer Portal locally

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

Troubleshooting

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;

developer-portal's People

Contributors

forevermatt avatar briskt avatar fillup avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.