Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Commit bd5d951

Browse files
committed
CLEAN INSTALL
1 parent 8c47d41 commit bd5d951

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2591
-4106
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

-4
This file was deleted.

docker-compose.yaml

+85-81
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,85 @@
1-
version: "3.8"
2-
3-
services:
4-
symfony:
5-
build: symfony_config
6-
container_name: symfony_docker
7-
ports:
8-
- "8245:80"
9-
volumes:
10-
- ./symfony_config/vhosts:/etc/apache2/sites-enabled
11-
- ./symfony_project:/var/www/symfony_project
12-
restart: always
13-
networks:
14-
- dev
15-
16-
maildev:
17-
image: maildev/maildev
18-
container_name: maildev_docker
19-
command: bin/maildev --web 80 --smtp 25 --hide-extensions STARTTLS
20-
ports:
21-
- "8081:80"
22-
restart: always
23-
networks:
24-
- dev
25-
26-
db:
27-
image: mariadb:10.7.1
28-
container_name: mariadb_docker
29-
restart: always
30-
volumes:
31-
- db-data:/var/lib/mysql
32-
environment:
33-
MYSQL_DATABASE: data
34-
MYSQL_USER: root
35-
MYSQL_ROOT_PASSWORD: password
36-
networks:
37-
- dev
38-
39-
phpmyadmin:
40-
image: phpmyadmin
41-
container_name: phpmyadmin_docker
42-
restart: always
43-
depends_on:
44-
- db
45-
ports:
46-
- "8080:80"
47-
environment:
48-
PMA_HOST: db
49-
networks:
50-
- dev
51-
52-
caddy:
53-
image: dunglas/mercure
54-
restart: unless-stopped
55-
container_name: mercure_docker
56-
environment:
57-
# Uncomment the following line to disable HTTPS
58-
SERVER_NAME: ":80"
59-
MERCURE_PUBLISHER_JWT_KEY: "!ChangeMe!"
60-
MERCURE_SUBSCRIBER_JWT_KEY: "!ChangeMe!"
61-
MERCURE_EXTRA_DIRECTIVES: cors_origins "http://localhost:3000"
62-
cors_origins "http://localhost:8245"
63-
# anonymous
64-
# Uncomment the following line to enable the development mode
65-
# command: /usr/bin/caddy run -config /etc/caddy/Caddyfile.dev
66-
ports:
67-
- "9090:80"
68-
- "443:443"
69-
# volumes:
70-
# - caddy_data:/data
71-
# - caddy_config:/config
72-
networks:
73-
- dev
74-
75-
networks:
76-
dev:
77-
78-
volumes:
79-
db-data:
80-
# caddy_data:
81-
# caddy_config:
1+
version: '3.8'
2+
3+
services:
4+
symfony:
5+
build: symfony_config
6+
container_name: symfony_docker
7+
ports:
8+
- "8245:80"
9+
volumes:
10+
- ./symfony_config/vhosts:/etc/apache2/sites-enabled
11+
- ./symfony_project:/var/www/symfony_project
12+
restart: on-failure
13+
networks:
14+
- dev
15+
# entrypoint: /bin/bash -c "cd symfony_project && composer install"
16+
17+
18+
19+
maildev:
20+
image: maildev/maildev
21+
container_name: maildev_docker
22+
command: bin/maildev --web 80 --smtp 25 --hide-extensions STARTTLS
23+
ports:
24+
- "8081:80"
25+
restart: on-failure
26+
networks:
27+
- dev
28+
29+
db:
30+
image: mariadb:10.7.1
31+
container_name: mariadb_docker
32+
restart: on-failure
33+
volumes:
34+
- db-data:/var/lib/mysql
35+
environment:
36+
MYSQL_DATABASE: data
37+
MYSQL_USER: root
38+
MYSQL_ROOT_PASSWORD: password
39+
networks:
40+
- dev
41+
42+
phpmyadmin:
43+
image: phpmyadmin
44+
container_name: phpmyadmin_docker
45+
restart: on-failure
46+
depends_on:
47+
- db
48+
ports:
49+
- "8080:80"
50+
environment:
51+
PMA_HOST: db
52+
networks:
53+
- dev
54+
55+
caddy:
56+
image: dunglas/mercure
57+
restart: unless-stopped
58+
container_name: mercure_docker
59+
environment:
60+
# Uncomment the following line to disable HTTPS
61+
SERVER_NAME: ':80'
62+
MERCURE_PUBLISHER_JWT_KEY: '!ChangeMe!'
63+
MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeMe!'
64+
MERCURE_EXTRA_DIRECTIVES:
65+
cors_origins "http://localhost:5432"
66+
cors_origins "http://localhost:8245"
67+
# anonymous
68+
# Uncomment the following line to enable the development mode
69+
# command: /usr/bin/caddy run -config /etc/caddy/Caddyfile.dev
70+
ports:
71+
- "9090:80"
72+
- "443:443"
73+
# volumes:
74+
# - caddy_data:/data
75+
# - caddy_config:/config
76+
networks:
77+
- dev
78+
79+
networks:
80+
dev:
81+
82+
volumes:
83+
db-data:
84+
# caddy_data:
85+
# caddy_config:

symfony_config/.DS_Store

-6 KB
Binary file not shown.

symfony_config/Dockerfile

+26-27
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
FROM php:8.1.2-apache
2-
3-
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf \
4-
\
5-
&& apt-get update \
6-
&& apt-get install -y --no-install-recommends \
7-
locales apt-utils git libicu-dev g++ libpng-dev libxml2-dev libzip-dev libonig-dev libxslt-dev unzip \
8-
\
9-
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
10-
&& echo "fr_FR.UTF-8 UTF-8" >> /etc/locale.gen \
11-
&& locale-gen \
12-
\
13-
&& curl -sS https://getcomposer.org/installer | php -- \
14-
&& mv composer.phar /usr/local/bin/composer
15-
16-
RUN docker-php-ext-configure \
17-
intl \
18-
&& docker-php-ext-install \
19-
pdo pdo_mysql opcache intl zip calendar dom mbstring gd xsl \
20-
\
21-
&& pecl install apcu && docker-php-ext-enable apcu
22-
23-
RUN curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.deb.sh' | bash
24-
25-
RUN apt install symfony-cli
26-
27-
WORKDIR /var/www/
1+
#syntax=docker/dockerfile:1.4
2+
FROM php:8.1-apache
3+
4+
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf \
5+
\
6+
&& apt-get update \
7+
&& apt-get install -y --no-install-recommends \
8+
locales apt-utils git libicu-dev g++ libpng-dev libxml2-dev libzip-dev libonig-dev libxslt-dev unzip \
9+
\
10+
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
11+
&& echo "fr_FR.UTF-8 UTF-8" >> /etc/locale.gen \
12+
&& locale-gen \
13+
\
14+
&& curl -sS https://getcomposer.org/installer | php -- \
15+
&& mv composer.phar /usr/local/bin/composer
16+
17+
RUN docker-php-ext-configure \
18+
intl \
19+
&& docker-php-ext-install \
20+
pdo pdo_mysql opcache intl zip calendar dom mbstring gd xsl \
21+
\
22+
&& pecl install apcu && docker-php-ext-enable apcu
23+
24+
RUN curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.deb.sh' | bash
25+
26+
RUN apt install symfony-cli
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
set -e
3+
4+
5+
if [ "$APP_ENV" != 'prod' ]; then
6+
cd /var/www/symfony_project
7+
composer install --prefer-dist --no-progress --no-interaction
8+
fi

symfony_config/vhosts/.DS_Store

-6 KB
Binary file not shown.

symfony_config/vhosts/vhosts.conf

-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33

44
DocumentRoot /var/www/symfony_project/public
55
DirectoryIndex /index.php
6-
76
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
87
<Directory /var/www/symfony_project/public>
98
AllowOverride None
109
Order Allow,Deny
1110
Allow from All
12-
1311
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
1412
FallbackResource /index.php
1513
</Directory>

symfony_project/.DS_Store

-6 KB
Binary file not shown.

symfony_project/.env

+50-48
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,50 @@
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-
#
13-
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
14-
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
15-
16-
###> symfony/framework-bundle ###
17-
APP_ENV=dev
18-
APP_SECRET=c4aeba3167b5b91d16100c35f43cd73f
19-
###< symfony/framework-bundle ###
20-
21-
###> doctrine/doctrine-bundle ###
22-
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
23-
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
24-
#
25-
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
26-
DATABASE_URL="mysql://root:password@db:3306/symfony_db?serverVersion=mariadb-10.7.1"
27-
#DATABASE_URL="postgresql://symfony:[email protected]:5432/app?serverVersion=13&charset=utf8"
28-
###< doctrine/doctrine-bundle ###
29-
30-
###> nelmio/cors-bundle ###
31-
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
32-
###< nelmio/cors-bundle ###
33-
34-
###> symfony/mercure-bundle ###
35-
# See https://symfony.com/doc/current/mercure.html#configuration
36-
# The URL of the Mercure hub, used by the app to publish updates (can be a local URL)
37-
MERCURE_URL=http://caddy/.well-known/mercure
38-
# The public URL of the Mercure hub, used by the browser to connect
39-
MERCURE_PUBLIC_URL=http://caddy/.well-known/mercure
40-
# The secret used to sign the JWTs
41-
MERCURE_JWT_SECRET="!ChangeMe!"
42-
###< symfony/mercure-bundle ###
43-
44-
###> lexik/jwt-authentication-bundle ###
45-
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
46-
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
47-
JWT_PASSPHRASE=0659445ba04e529fae9564a75479b4bd
48-
###< lexik/jwt-authentication-bundle ###
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=d6f7c01d2d1edfc987e862b9d8bc9f52
20+
###< symfony/framework-bundle ###
21+
22+
###> doctrine/doctrine-bundle ###
23+
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
24+
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
25+
#
26+
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
27+
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=8&charset=utf8mb4"
28+
DATABASE_URL="mysql://root:password@db:3306/data?serverVersion=mariadb-10.7.1"
29+
###< doctrine/doctrine-bundle ###
30+
31+
32+
###> nelmio/cors-bundle ###
33+
CORS_ALLOW_ORIGIN=(.*)
34+
###< nelmio/cors-bundle ###
35+
36+
###> symfony/mercure-bundle ###
37+
# See https://symfony.com/doc/current/mercure.html#configuration
38+
# The URL of the Mercure hub, used by the app to publish updates (can be a local URL)
39+
MERCURE_URL=http://caddy/.well-known/mercure
40+
# The public URL of the Mercure hub, used by the browser to connect
41+
MERCURE_PUBLIC_URL=http://caddy/.well-known/mercure
42+
# The secret used to sign the JWTs
43+
MERCURE_JWT_SECRET="!ChangeMe!"
44+
###< symfony/mercure-bundle ###
45+
46+
###> lexik/jwt-authentication-bundle ###
47+
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
48+
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
49+
JWT_PASSPHRASE=b183b1f8a95456d74242bff2bb99f8db
50+
###< lexik/jwt-authentication-bundle ###

symfony_project/.gitignore

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
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-
###> lexik/jwt-authentication-bundle ###
13-
/config/jwt/*.pem
14-
###< lexik/jwt-authentication-bundle ###
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+
###> lexik/jwt-authentication-bundle ###
13+
/config/jwt/*.pem
14+
###< lexik/jwt-authentication-bundle ###

0 commit comments

Comments
 (0)