Git Product home page Git Product logo

symfony-demo-kubernetes's Introduction

Symfony Demo Application for Kubernetes

This is an example on how to package the symfony demo application into a Docker image and deploy it to Kubernetes.

For the Kubernetes Deployment example see deployment/webapp.yaml.

Symfony Demo Application

The "Symfony Demo Application" is a reference application created to show how to develop Symfony applications following the recommended best practices.

Requirements

Installation

Execute this command to install the project:

$ composer create-project symfony/symfony-demo

Deploy

Usage

There's no need to configure anything to run the application. Just execute this command to run the built-in web server and access the application in your browser at http://localhost:8000:

$ cd symfony-demo/
$ php bin/console server:run

Alternatively, you can configure a fully-featured web server like Nginx or Apache to run the application.

Run in Kubernetes

$ docker build -t symfony-demo:1.0.0 .
$ kubectl create -f deployment

Tests

Execute this command to run tests:

$ cd symfony-demo/
$ ./vendor/bin/simple-phpunit

symfony-demo-kubernetes's People

Contributors

bashofmann avatar dependabot[bot] avatar thaasch avatar

Stargazers

Aurélien GIRY avatar Hennadii Tarasenko avatar Jerry-Pan avatar Alyson Rodrigo avatar Dan avatar Brandon Gachenot avatar Pavel Shvedenko avatar Julien avatar Sergey Mokrushin avatar Patrick Kilter avatar GT avatar Raouf avatar  avatar Erkan Ozsoy avatar Ján Bočínec avatar Diego Mariano Plencovich avatar Loïc avatar John in 't Hout avatar Luciano Jr avatar Damien Goujard avatar Ron avatar Dominick Rivard avatar Tom avatar william avatar Steffen Gransow avatar Janusz Żukowicz avatar Pavel Nemchenko avatar  avatar Ayrton Ricardo avatar Chris Tanaskoski avatar ykocaman avatar Andrea Sangiorgio avatar  avatar Noah-Jerome Lotzer avatar Ivan Popov avatar Dimitris Stoikidis avatar Malte avatar Ole Rößner avatar Lakshminp avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

symfony-demo-kubernetes's Issues

Found issues with Dockerfile_nginx

Hi Bastian!

I saw your Kubernetes presentation at Confoo, and I really loved it.

I was playing around with your Symfony / Kubernetes repository, and although everything works fine with the php-apache image, I had trouble with the php-fpm / nginx version.

I had to add the following lines in Dockerfile_nginx to make it work:

RUN cp .env.dist .env
RUN mkdir -p /var/www/html/var

The ­­­­­­­­­´mkdir´ was necessary because otherwise the deployment will complain that it cannot ´chown´ a directorry that doesn't exist.

The ´cp .env.dist .env´ was necessary because otherwise Symfony would complain about the missing ´.env´ file. I am not sure why this is required, when the standard ´Dockerfile´ works fine without it. Do you have an idea?

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.