Code Monkey home page Code Monkey logo

symfony-docker's Introduction

๐ŸŽผ Symfony Docker ๐Ÿ‹

Code style Mess detector Static analysis Unit tests Security

A webapp starting template for Symfony 6 with Docker Compose.

๐Ÿ“œ Introduction

This repository acts as a template to set up basic Symfony webapp with docker compose and Traefik.

Prerequisites

Note: You can switch out Traefik for any other reverse proxy of your choice (or not use a reverse proxy at all), but this would require additional tweaking of labels (or exposing ports) in the docker compose configuration.

๐ŸŽฌ Get Started

Update hosts file

Add webapp.local to your hosts files, e.g. /etc/hosts (Unix).

Initialise dotenv

For first time setup, initialise the .env.local from the .env.

task init

You can now tweak the values in the .env.local if needed.

Start application services

task up

Visit the application

If the reverse proxy is configured correctly, you should be able to visit webapp.local in your browser and be greeted by Symfony's default landing page.

Note: You can disregard the SSL certificate warnings for development usages.

๐Ÿ› ๏ธ Contribute

Install dependencies

task app:install:dev

Enable GrumPHP

task grum:init

Manual test run

task contribute

๐Ÿงฐ DIY

If you want to create a Symfony project from scratch yourself, with the essential dependencies, you can do the following:

# Substitute "dev.example.com" with desired project directory name
docker run --rm -it -v $(pwd):/app composer:2 create-project symfony/skeleton:6.4.* dev.example.com
docker run --rm -it -v $(pwd)/dev.example.com:/app composer:2 require webapp -n
sudo chown -R $(id -u):$(id -g) $(pwd)/dev.example.com

This will give you a basic Symfony webapp environment (without Docker).

โ• Licence

This repository comes with a MIT license.

symfony-docker's People

Contributors

dependabot[bot] avatar toshy avatar

Stargazers

 avatar  avatar

Watchers

 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.