Code Monkey home page Code Monkey logo

symfony-skeleton-6.1's Introduction

Symfony Docker (PHP8 / Caddy / Postgresql)

A Docker-based installer and runtime for the Symfony web framework, with full HTTP/2, HTTP/3 and HTTPS support.

Getting Started

  1. If not already done, install Docker Compose
  2. Run docker compose build --pull --no-cache to build fresh images
  3. Run docker compose up (the logs will be displayed in the current shell) or Run docker compose up -d to run in background
  4. Open https://localhost in your favorite web browser and accept the auto-generated TLS certificate
  5. Run docker compose down --remove-orphans to stop and remove the Docker containers.
  6. Run docker compose logs -f to display current logs, docker compose logs -f [CONTAINER_NAME] to display specific container's current logs

Adminer

  1. Navigate to http://localhost:8080
  2. Use the following credentials:
    • System: PostgreSQL
    • Server: database
    • Username: symfony
    • Password: ChangeMe
    • Database: app

Pages of this project

Commands

# Create a new controller
docker compose exec php bin/console make:controller

# If you are lazy, create an alias
alias con="docker compose exec php bin/console"

# Create a new entity
con make:entity

# Create migration file
con make:migration

# Create a new crud
con make:crud

# Apply migration
con doctrine:migrations:migrate

# Revert migration
con doctrine:migrations:migrate prev

# Create database
con doctrine:database:create

# Drop database
con doctrine:database:drop

# List all routes
con debug:route

# Create a use
con make:user

# Create an authenticator
con make:auth

# Hash a string
con security:hash

# Install `orm-fixtures` package
docker compose exec php composer require orm-fixtures --dev

# Update fixtures and purge database
con d:f:l -n

# Install `faker` package
docker compose exec php composer require fakerphp/faker --dev

# https://github.com/doctrine-extensions/DoctrineExtensions
docker compose exec php composer require stof/doctrine-extensions-bundle
# Answer "Y" to the question asked during the installation process

docker compose exec php composer require symfony/validator

docker compose exec php composer require vich/uploader-bundle

symfony-skeleton-6.1's People

Contributors

adrienmrn avatar quozul avatar

Stargazers

 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.