Skip to content

Commit 359d171

Browse files
Stephan OrbaughStephan Orbaugh
Stephan Orbaugh
authored and
Stephan Orbaugh
committed
Initial commit
0 parents  commit 359d171

21 files changed

+2851
-0
lines changed

.env

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# In all environments, the following files are loaded if they exist,
2+
# the latter taking precedence over the former:
3+
#
4+
# * .env contains default values for the environment variables needed by the app
5+
# * .env.local uncommitted file with local overrides
6+
# * .env.$APP_ENV committed environment-specific defaults
7+
# * .env.$APP_ENV.local uncommitted environment-specific overrides
8+
#
9+
# Real environment variables win over .env files.
10+
#
11+
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
12+
# https://symfony.com/doc/current/configuration/secrets.html
13+
#
14+
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
15+
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
16+
17+
###> symfony/framework-bundle ###
18+
APP_ENV=dev
19+
APP_SECRET=e878e509d40f289c8432294e4fc8d85f
20+
###< symfony/framework-bundle ###

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
###> symfony/framework-bundle ###
3+
/.env.local
4+
/.env.local.php
5+
/.env.*.local
6+
/config/secrets/prod/prod.decrypt.private.php
7+
/public/bundles/
8+
/var/
9+
/vendor/
10+
###< symfony/framework-bundle ###
11+
12+
### PhpStorm ###
13+
/.idea

Dockerfile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Use the official PHP image
2+
FROM php:8.2-fpm
3+
4+
# Install system dependencies
5+
RUN apt-get update && apt-get install -y \
6+
libicu-dev \
7+
libzip-dev \
8+
unzip \
9+
mariadb-client \
10+
libpq-dev \
11+
nodejs \
12+
npm
13+
14+
# Install PHP extensions
15+
RUN docker-php-ext-configure intl
16+
RUN docker-php-ext-install pdo pdo_mysql intl zip
17+
18+
# Install Composer
19+
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
20+
21+
RUN npm install -g yarn
22+
23+
# Set the working directory to /var/www
24+
WORKDIR /var/www
25+
26+
# Expose port 80 to connect to the PHP-FPM server
27+
EXPOSE 80
28+
29+
# Start PHP-FPM server
30+
CMD ["php-fpm"]

README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Symfony 6.3 Docker Starter
2+
3+
This is an empty Symfony setup with Docker for anyone wanting to develop a Symfony 6.3 application from scratch.
4+
5+
## Getting Started
6+
7+
These instructions will help you set up a local development environment for your Symfony application.
8+
9+
### Prerequisites
10+
11+
- Docker
12+
- Docker Compose
13+
- Git
14+
15+
### Usage
16+
17+
1. Clone this repository to your local machine:
18+
19+
```bash
20+
git clone https://github.com/sorbaugh/symfony63-docker-starter.git
21+
cd symfony63-docker-starter
22+
```
23+
2. Build and start the Docker containers:
24+
```bash
25+
docker-compose up -d
26+
```
27+
3. Install Symfony dependencies:
28+
```bash
29+
docker-compose exec php_symfony63_app composer install
30+
```
31+
4. Access your Symfony application in a web browser:
32+
- Symfony: http://localhost:9000
33+
- phpMyAdmin: http://localhost:8080
34+
35+
### Contributing
36+
Feel free to contribute to this starter template. If you have improvements or suggestions, please create a pull request.

bin/console

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
use App\Kernel;
5+
use Symfony\Bundle\FrameworkBundle\Console\Application;
6+
7+
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
8+
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
9+
}
10+
11+
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
12+
13+
return function (array $context) {
14+
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
15+
16+
return new Application($kernel);
17+
};

composer.json

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"type": "project",
3+
"license": "proprietary",
4+
"minimum-stability": "stable",
5+
"prefer-stable": true,
6+
"require": {
7+
"php": ">=8.1",
8+
"ext-ctype": "*",
9+
"ext-iconv": "*",
10+
"symfony/console": "6.3.*",
11+
"symfony/dotenv": "6.3.*",
12+
"symfony/flex": "^2",
13+
"symfony/framework-bundle": "6.3.*",
14+
"symfony/runtime": "6.3.*",
15+
"symfony/yaml": "6.3.*"
16+
},
17+
"require-dev": {
18+
},
19+
"config": {
20+
"allow-plugins": {
21+
"php-http/discovery": true,
22+
"symfony/flex": true,
23+
"symfony/runtime": true
24+
},
25+
"sort-packages": true
26+
},
27+
"autoload": {
28+
"psr-4": {
29+
"App\\": "src/"
30+
}
31+
},
32+
"autoload-dev": {
33+
"psr-4": {
34+
"App\\Tests\\": "tests/"
35+
}
36+
},
37+
"replace": {
38+
"symfony/polyfill-ctype": "*",
39+
"symfony/polyfill-iconv": "*",
40+
"symfony/polyfill-php72": "*",
41+
"symfony/polyfill-php73": "*",
42+
"symfony/polyfill-php74": "*",
43+
"symfony/polyfill-php80": "*",
44+
"symfony/polyfill-php81": "*"
45+
},
46+
"scripts": {
47+
"auto-scripts": {
48+
"cache:clear": "symfony-cmd",
49+
"assets:install %PUBLIC_DIR%": "symfony-cmd"
50+
},
51+
"post-install-cmd": [
52+
"@auto-scripts"
53+
],
54+
"post-update-cmd": [
55+
"@auto-scripts"
56+
]
57+
},
58+
"conflict": {
59+
"symfony/symfony": "*"
60+
},
61+
"extra": {
62+
"symfony": {
63+
"allow-contrib": false,
64+
"require": "6.3.*"
65+
}
66+
}
67+
}

0 commit comments

Comments
 (0)