Loading .env +5 −0 Original line number Diff line number Diff line Loading @@ -39,3 +39,8 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 ###> symfony/mailer ### # MAILER_DSN=null://null ###< symfony/mailer ### DATABASE_PORT="5432" NGINX_PORT="80" APP_BASE_DIR="./" POSTGRES_USER="postgres" POSTGRES_PASSWORD="12345" No newline at end of file .gitignore +3 −1 Original line number Diff line number Diff line Loading @@ -24,3 +24,5 @@ /assets/vendor/ ###< symfony/asset-mapper ### /.idea .env; .env.test; No newline at end of file docker-compose.yaml 0 → 100644 +42 −0 Original line number Diff line number Diff line version: "3" services: database: container_name: postgres image: postgres:16.2-alpine environment: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_HOST_AUTH_METHOD: trust ports: - "${DATABASE_PORT}:${DATABASE_PORT}" networks: - internal nginx: build: dockerfile: ./docker/nginx/Dockerfile args: COMPOSER_AUTH: "{}" APP_BASE_DIR: ${APP_BASE_DIR-.} volumes: - ".:/app" - './docker/nginx/default.conf:/etc/nginx/conf.d/default.conf' ports: - '${NGINX_PORT}:${NGINX_PORT}' networks: - internal app: build: dockerfile: ./docker/php/Dockerfile args: COMPOSER_AUTH: "{}" APP_BASE_DIR: ${APP_BASE_DIR-.} volumes: - ".:/app" restart: unless-stopped networks: - internal networks: internal: driver: bridge No newline at end of file docker/nginx/Dockerfile 0 → 100644 +6 −0 Original line number Diff line number Diff line FROM nginx:alpine WORKDIR "/app" ARG APP_BASE_DIR COPY $APP_BASE_DIR . docker/nginx/default.conf 0 → 100644 +31 −0 Original line number Diff line number Diff line server { #This config is based on https://github.com/daylerees/laravel-website-configs/blob/6db24701073dbe34d2d58fea3a3c6b3c0cd5685b/nginx.conf # The location of our project's public directory. root /app/public; # Point index to the Laravel front controller. index index.php; location / { # URLs to attempt, including pretty ones. try_files $uri $uri/ /index.php?$query_string; } # Remove trailing slash to please routing system. if (!-d $request_filename) { rewrite ^/(.+)/$ /$1 permanent; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # # With php5-fpm: fastcgi_pass app:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; } } No newline at end of file Loading
.env +5 −0 Original line number Diff line number Diff line Loading @@ -39,3 +39,8 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 ###> symfony/mailer ### # MAILER_DSN=null://null ###< symfony/mailer ### DATABASE_PORT="5432" NGINX_PORT="80" APP_BASE_DIR="./" POSTGRES_USER="postgres" POSTGRES_PASSWORD="12345" No newline at end of file
.gitignore +3 −1 Original line number Diff line number Diff line Loading @@ -24,3 +24,5 @@ /assets/vendor/ ###< symfony/asset-mapper ### /.idea .env; .env.test; No newline at end of file
docker-compose.yaml 0 → 100644 +42 −0 Original line number Diff line number Diff line version: "3" services: database: container_name: postgres image: postgres:16.2-alpine environment: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_HOST_AUTH_METHOD: trust ports: - "${DATABASE_PORT}:${DATABASE_PORT}" networks: - internal nginx: build: dockerfile: ./docker/nginx/Dockerfile args: COMPOSER_AUTH: "{}" APP_BASE_DIR: ${APP_BASE_DIR-.} volumes: - ".:/app" - './docker/nginx/default.conf:/etc/nginx/conf.d/default.conf' ports: - '${NGINX_PORT}:${NGINX_PORT}' networks: - internal app: build: dockerfile: ./docker/php/Dockerfile args: COMPOSER_AUTH: "{}" APP_BASE_DIR: ${APP_BASE_DIR-.} volumes: - ".:/app" restart: unless-stopped networks: - internal networks: internal: driver: bridge No newline at end of file
docker/nginx/Dockerfile 0 → 100644 +6 −0 Original line number Diff line number Diff line FROM nginx:alpine WORKDIR "/app" ARG APP_BASE_DIR COPY $APP_BASE_DIR .
docker/nginx/default.conf 0 → 100644 +31 −0 Original line number Diff line number Diff line server { #This config is based on https://github.com/daylerees/laravel-website-configs/blob/6db24701073dbe34d2d58fea3a3c6b3c0cd5685b/nginx.conf # The location of our project's public directory. root /app/public; # Point index to the Laravel front controller. index index.php; location / { # URLs to attempt, including pretty ones. try_files $uri $uri/ /index.php?$query_string; } # Remove trailing slash to please routing system. if (!-d $request_filename) { rewrite ^/(.+)/$ /$1 permanent; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # # With php5-fpm: fastcgi_pass app:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; } } No newline at end of file