Skip to content

Commit 3d47033

Browse files
author
Julien Neuhart
authored
Merge pull request #12 from thecodingmachine/real-boilerplate
Make a ready-to-user boilerplate and update documentation
2 parents e1f7b3d + f91eb91 commit 3d47033

File tree

252 files changed

+6554
-9785
lines changed

Some content is hidden

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

252 files changed

+6554
-9785
lines changed

.env.dist

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
# dummy values and variables you want to reuse
66
# in two or more services.
77

8+
APP_NAME=Symfony Boilerplate
9+
810
# Domain
9-
DOMAIN=companies-and-products.localhost
11+
DOMAIN=symfony-boilerplate.localhost
1012
API_SUBDOMAIN=api
1113
STORAGE_SUBDOMAIN=minio
1214

@@ -15,7 +17,7 @@ APP_SECRET=$ecretf0rt3st
1517

1618
# MySQL
1719
MYSQL_ROOT_PASSWORD=super-secret
18-
MYSQL_DATABASE=companies-and-products
20+
MYSQL_DATABASE=symfony-boilerplate
1921
MYSQL_USER=api-agent
2022
MYSQL_PASSWORD=secret
2123

@@ -28,8 +30,5 @@ STORAGE_PRIVATE_BUCKET=private
2830
STORAGE_ACCESS_KEY=accesskey
2931
STORAGE_SECRET_KEY=secretkey
3032

31-
# Public storage folders.
32-
PUBLIC_STORAGE_PRODUCT_PICTURE=product_picture
33-
3433
# i18n
3534
DEFAULT_LOCALE=en

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Those variables are only used for the Vagrant command!
22
VAGRANT_BOX=bento/ubuntu-20.04
3-
VAGRANT_PROJECT_NAME=companies-and-products
3+
VAGRANT_PROJECT_NAME=symfony-boilerplate
44
VAGRANT_MEMORY=4096
55
VAGRANT_CPUS=2
66
VAGRANT_DOCKER_COMPOSE_VERSION=1.27.3

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ This is a template of a *README*. Adapt it according to the comments and your ne
1212

1313
---
1414

15-
# Companies and products
15+
# Symfony Boilerplate
1616

1717
> Replace this title and the following description with your project name and description.
1818
19-
This project is an example of a web application built with Nuxt.js, Symfony 5, and GraphQL.
19+
A web application built with Nuxt.js, Symfony 5, and GraphQL.
2020

2121
## Setup
2222

@@ -48,12 +48,12 @@ For instance, instead of running `make up`, run `docker-compose up -d`.
4848
Update your `hosts` file with the following entries:
4949

5050
```
51-
127.0.0.1 traefik.companies-and-products.localhost
52-
127.0.0.1 companies-and-products.localhost
53-
127.0.0.1 api.companies-and-products.localhost
54-
127.0.0.1 phpmyadmin.companies-and-products.localhost
55-
127.0.0.1 minio.companies-and-products.localhost
56-
127.0.0.1 mailhog.companies-and-products.localhost
51+
127.0.0.1 traefik.symfony-boilerplate.localhost
52+
127.0.0.1 symfony-boilerplate.localhost
53+
127.0.0.1 api.symfony-boilerplate.localhost
54+
127.0.0.1 phpmyadmin.symfony-boilerplate.localhost
55+
127.0.0.1 minio.symfony-boilerplate.localhost
56+
127.0.0.1 mailhog.symfony-boilerplate.localhost
5757
```
5858

5959
> Update the domain with the one used in your project.
@@ -128,12 +128,12 @@ The containers will be ready faster next time you run this command as the first
128128

129129
Once everything is ready, the following endpoints should be available:
130130

131-
* http://traefik.companies-and-products.localhost (Reverse proxy, the entry point of all the HTTP requests)
132-
* http://companies-and-products.localhost (Web application)
133-
* http://api.companies-and-products.localhost (API)
134-
* http://phpmyadmin.companies-and-products.localhost (phpMyAdmin, a web interface for your MySQL database)
135-
* http://minio.companies-and-products.localhost (S3 compatible storage)
136-
* http://mailhog.companies-and-products.localhost (Emails catcher)
131+
* http://traefik.symfony-boilerplate.localhost (Reverse proxy, the entry point of all the HTTP requests)
132+
* http://symfony-boilerplate.localhost (Web application)
133+
* http://api.symfony-boilerplate.localhost (API)
134+
* http://phpmyadmin.symfony-boilerplate.localhost (phpMyAdmin, a web interface for your MySQL database)
135+
* http://minio.symfony-boilerplate.localhost (S3 compatible storage)
136+
* http://mailhog.symfony-boilerplate.localhost (Emails catcher)
137137

138138
> Update the domain with the one used in your project.
139139

docker-compose.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,21 @@ services:
3939
# Either Vagrant or Docker requires the usage of polling, otherwise Nuxt.js does not recompile our code
4040
# as fast as we would like.
4141
CHOKIDAR_USEPOLLING: "1"
42-
CHOKIDAR_INTERVAL: "1000" # Lower values might increase CPU usage.
42+
CHOKIDAR_INTERVAL: "3000" # Lower values might increase CPU usage.
4343
# Host 0.0.0.0 is designated to tell Nuxt.js to resolve a host address, which is accessible to connections outside
4444
# of the host machine.
4545
HOST: "0.0.0.0"
4646
# Nuxt.js
4747
# ---------------------
48+
APP_NAME: "$APP_NAME"
4849
# API.
4950
API_URL: "http://$API_SUBDOMAIN.$DOMAIN/"
5051
# GraphQL.
5152
GRAPHQL_URL: "http://$API_SUBDOMAIN.$DOMAIN/graphql"
5253
# Public storage.
5354
# Access to these files is done via URLs created using:
54-
# "$PUBLIC_STORAGE_URL" + "$PUBLIC_STORAGE_PRODUCT_PICTURE" + "/" + filename.
55+
# "$PUBLIC_STORAGE_URL" + folder + "/" + filename.
5556
PUBLIC_STORAGE_URL: "http://$STORAGE_SUBDOMAIN.$DOMAIN/public/"
56-
PUBLIC_STORAGE_PRODUCT_PICTURE: "$PUBLIC_STORAGE_PRODUCT_PICTURE"
5757
# i18n.
5858
DEFAULT_LOCALE: "$DEFAULT_LOCALE"
5959
# LogRocket.
@@ -82,6 +82,7 @@ services:
8282
STARTUP_COMMAND_4: "php bin/console app:init-storage:s3"
8383
# Symfony.
8484
# ---------------------
85+
APP_NAME: "$APP_NAME"
8586
APP_ENV: "dev"
8687
APP_DEBUG: "1"
8788
# Note: in your remote environments, make sure you do not change
@@ -108,14 +109,12 @@ services:
108109
STORAGE_PRIVATE_BUCKET: "$STORAGE_PRIVATE_BUCKET"
109110
STORAGE_ACCESS_KEY: "$STORAGE_ACCESS_KEY"
110111
STORAGE_SECRET_KEY: "$STORAGE_SECRET_KEY"
111-
# Public storage folders.
112-
PUBLIC_STORAGE_PRODUCT_PICTURE: "$PUBLIC_STORAGE_PRODUCT_PICTURE"
113112
# i18n.
114113
DEFAULT_LOCALE: "$DEFAULT_LOCALE"
115114
# Mailer.
116115
MAILER_DSN: "smtp://null:null@mailhog:1025"
117116
MAIL_FROM_ADDRESS: "no-reply@$DOMAIN"
118-
MAIL_FROM_NAME: "Companies and products"
117+
MAIL_FROM_NAME: "$APP_NAME"
119118
MAIL_WEBAPP_URL: "http://$DOMAIN/"
120119
MAIL_WEBAPP_UPDATE_PASSWORD_ROUTE_FORMAT: "%s/update-password/%s/%s" # {locale}/update-password/{resetPasswordTokenId}/{plainToken}
121120
volumes:
File renamed without changes.

docs/docs/2_Development Environment/2_1_Docker Compose.md renamed to docs/docs/02_Development Environment/1_Docker Compose.md

File renamed without changes.
File renamed without changes.

docs/docs/2_Development Environment/2_3_Housekeeping.md renamed to docs/docs/02_Development Environment/3_Housekeeping.md

File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Overview
3-
slug: /api/overview
3+
slug: /api
44
---
55

66
We built the API with [Symfony 5](https://symfony.com/), [TDBM](https://github.com/thecodingmachine/tdbm), and

0 commit comments

Comments
 (0)