Giter Site home page Giter Site logo

php-pricelist's Introduction

PHP Pircelist Sample App

Create a new project

Create a new project if you don't have one (this step is optional)

user@host$  oc new-project test --display-name="Test Project"

Create Database

Using the example below; create a database app.

NOTE:

  • The values of MYSQL_USER,MYSQL_PASSWORD, and MYSQL_DATABASE can be set to whatever you'd like
  • However; DATABASE_SERVICE_NAME must be kept as mysql
user@host$ oc new-app --name=mysql -l appname=mysqlcrud --template=mysql-ephemeral -p DATABASE_SERVICE_NAME=mysql,MYSQL_USER=pricelist,MYSQL_PASSWORD=pricelist,MYSQL_DATABASE=pricelist

Create your application

Create your application using this repo; passing the parameters you used above

user@host$ oc new-app --name=pricelist https://github.com/christianh814/php-pricelist -e MYSQL_USER=pricelist -e MYSQL_PASSWORD=pricelist -e MYSQL_DATABASE=pricelist -l appname=pricelist
user@host$ oc expose svc/pricelist

If you created the app before the DB you may have to inject these variables

user@host$ oc env dc/pricelist MYSQL_USER=pricelist MYSQL_PASSWORD=pricelist MYSQL_DATABASE=pricelist

Initialize the database

Initialize the DB with a curl cummand

curl -k http://$(oc get route/php-pricelist -o jsonpath='{.spec.host}')/create_database.php

Where route/php-pricelist is what you named the app.

php-pricelist's People

Contributors

christianh814 avatar

Watchers

Paul Turnbull 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.