8000 feat: update to PHP 8.2 and remove docker-sync · ger86/symfony-docker@f604435 · GitHub
[go: up one dir, main page]

Skip to content

Commit f604435

Browse files
committed
feat: update to PHP 8.2 and remove docker-sync
1 parent 1c9a9f6 commit f604435

File tree

6 files changed

+524
-650
lines changed

6 files changed

+524
-650
lines changed

.docker/docker-compose.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "3"
22

33
services:
44
db:
5-
image: mysql:8.0.23
5+
image: mysql:8.0.33
66
platform: linux/x86_64
77
command: --default-authentication-plugin=mysql_native_password
88
volumes:
@@ -15,32 +15,36 @@ services:
1515
ports:
1616
- 3306:3306
1717
networks:
18-
- symfony
18+
- symfony_app
1919
php:
2020
build:
2121
context: ./php
2222
args:
2323
TIMEZONE: ${TIMEZONE}
2424
volumes:
25-
- symfony_dockerized_app_sync:/var/www/symfony/
25+
- ../:/var/www/symfony:cached
26+
- symfony_app_var:/var/www/symfony/var
27+
- symfony_app_vendor:/var/www/symfony/vendor
2628
networks:
27-
- symfony
29+
- symfony_app
2830
nginx:
2931
build:
3032
context: ./nginx
3133
volumes:
32-
- symfony_dockerized_app_sync:/var/www/symfony/
34+
- ../:/var/www/symfony:cached
35+
- symfony_app_var:/var/www/symfony/var
36+
- symfony_app_vendor:/var/www/symfony/vendor
3337
ports:
3438
- 80:80
3539
networks:
36-
- symfony
40+
- symfony_app
3741
env_file:
3842
- .env.nginx.local
3943

4044
volumes:
41-
symfony_dockerized_app_sync:
42-
external: true
45+
symfony_app_var:
46+
symfony_app_vendor:
4347
db_app:
4448

4549
networks:
46-
symfony:
50+
symfony_app:

.docker/docker-sync.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.docker/php/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.1-fpm-buster
1+
FROM php:8.2-fpm-buster
22
ARG TIMEZONE
33

44
COPY php.ini /usr/local/etc/php/conf.d/docker-php-config.ini

Readme.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
1-
# 🐳 Docker + PHP 8.1 + MySQL + Nginx + Symfony 6.1 Boilerplate
1+
# 🐳 Docker + PHP 8.2 + MySQL + Nginx + Symfony 6.2 Boilerplate
22

33
## Description
44

5-
This is a complete stack for running Symfony 6.1 into Docker containers using docker-compose tool with [docker-sync library](https://docker-sync.readthedocs.io/en/latest/).
5+
This is a complete stack for running Symfony 6.2 into Docker containers using docker-compose tool.
66

77
It is composed by 4 containers:
88

99
- `nginx`, acting as the webserver.
1010
- `php`, the PHP-FPM container with the 8.0 version of PHP.
1111
- `db` which is the MySQL database container with a **MySQL 8.0** image.
12-
- `symfony_docker_app_sync` to sync files using library `docker-sync `.
1312

1413
## Installation
1514

16-
1. 😀 Clone this rep.
15+
1. 😀 Clone this repo.
1716

18-
2. Create the file `./.docker/.env.nginx.local` using `./.docker/.env.nginx` as template. The value of the variable `NGINX_BACKEND_DOMAIN` is the `server_name` used in NGINX.
17+
2. If you are working with Docker Desktop for Mac, ensure **you have enabled `VirtioFS` for your sharing implementation**. `VirtioFS` brings improved I/O performance for operations on bind mounts. Enabling VirtioFS will automatically enable Virtualization framework.
1918

20-
3. Go inside folder `./docker` and run `docker-sync-stack start` to start containers.
19+
3. Create the file `./.docker/.env.nginx.local` using `./.docker/.env.nginx` as template. The value of the variable `NGINX_BACKEND_DOMAIN` is the `server_name` used in NGINX.
2120

22-
4. You should work inside the `php` container. This project is configured to work with [Remote Container](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension for Visual Studio Code, so you could run `Reopen in container` command after open the project.
21+
4. Go inside folder `./docker` and run `docker compose up -d` to start containers.
2322

24-
5. Inside the `php` container, run `composer install` to install dependencies from `/var/www/symfony` folder.
23+
5. You should work inside the `php` container. This project is configured to work with [Remote Container](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension for Visual Studio Code, so you could run `Reopen in container` command after open the project.
2524

26-
6. Use the following value for the DATABASE_URL environment variable:
25+
6. Inside the `php` container, run `composer install` to install dependencies from `/var/www/symfony` folder.
26+
27+
7. Use the following value for the DATABASE_URL environment variable:
2728

2829
```
2930
DATABASE_URL=mysql://app_user:helloworld@db:3306/app_db?serverVersion=8.0.23

composer.json

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
22
"type": "project",
33
"license": "proprietary",
44
"require": {
5-
"php": "^8.1",
5+
"php": "^8.2",
66
"ext-ctype": "*",
77
"ext-iconv": "*",
8-
"composer/package-versions-deprecated": "1.11.99.4",
9-
"doctrine/doctrine-bundle": "2.5.*",
10-
"doctrine/doctrine-migrations-bundle": "3.2.*",
11-
"doctrine/orm": "2.11.*",
12-
"symfony/console": "6.1.*",
13-
"symfony/dotenv": "6.1.*",
14-
"symfony/flex": "^1.3.1",
15-
"symfony/framework-bundle": "6.1.*",
16-
"symfony/runtime": "6.1.*",
17-
"symfony/yaml": "6.1.*"
8+
"composer/package-versions-deprecated": "1.11.99.5",
9+
"doctrine/annotations": "^2.0",
10+
"doctrine/doctrine-bundle": "^2.8",
11+
"doctrine/doctrine-migrations-bundle": "^3.2",
12+
"doctrine/orm": "^2.14",
13+
"symfony/console": "6.2.*",
14+
"symfony/dotenv": "6.2.*",
15+
"symfony/flex": "^2",
16+
"symfony/framework-bundle": "6.2.*",
17+
"symfony/runtime": "6.2.*",
18+
"symfony/yaml": "6.2.*"
1819
},
1920
"require-dev": {
20-
"symfony/maker-bundle": "1.43.*"
21+
"symfony/maker-bundle": "^1.48"
2122
},
2223
"config": {
2324
"preferred-install": {
@@ -66,7 +67,7 @@
6667
"extra": {
6768
"symfony": {
6869
"allow-contrib": false,
69-
"require": "6.1.*"
70+
"require": "6.2.*"
7071
}
7172
}
7273
}

0 commit comments

Comments
 (0)
0