Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5d12552

Browse files
committed
Update file
1 parent b863576 commit 5d12552

File tree

4 files changed

+135
-85
lines changed

4 files changed

+135
-85
lines changed

‎README.md‎

Lines changed: 113 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
If You want to build a website with Symfony at short time;
44

55
#### Full stack Apache2 Symfony:
6-
<p align="left"> <a href="https://www.symfony.com/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/143937?s=200&v=4" alt="Symfony" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
6+
<p align="left">
7+
<a href="https://www.symfony.com/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/143937?s=200&v=4" alt="Symfony" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
78
<a href="https://www.docker.com/" target="_blank" rel="noreferrer"> <img src="https://raw.githubusercontent.com/github/explore/80688e429a7d4ef2fca1e82350fe8e3517d3494d/topics/docker/docker.png" alt="docker" width="40" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
89
<a href="https://mariadb.org/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/5877084?s=200&v=4" alt="mariadb" height="50" width="50"/> </a>&nbsp;&nbsp;&nbsp;
910
<a href="https://dev.mysql.com/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/2452804?s=200&v=4" alt="mysql" height="50" width="50"/> </a>&nbsp;&nbsp;&nbsp;
@@ -15,7 +16,8 @@ If You want to build a website with Symfony at short time;
1516
<a href="https://certbot.eff.org/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/17889013?s=200&v=4" alt="certbot" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
1617
<a href="https://letsencrypt.org/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/9289019?s=200&v=4" alt="letsencrypt" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
1718
<a href="https://www.portainer.io/?hsLang=en" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/22225832?s=200&v=4" alt="portainer" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
18-
<a href="https://www.offen.dev/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/47735043?s=200&v=4" alt="backup" height="35" width="35"/> </a> </p>
19+
<a href="https://www.offen.dev/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/47735043?s=200&v=4" alt="backup" height="35" width="35"/> </a>
20+
</p>
1921

2022
Plus, manage docker containers with Portainer.
2123

@@ -26,15 +28,17 @@ Plus, manage docker containers with Portainer.
2628
<p align="left"> apk, dnf, yum, apt/apt-get, zypper, pacman </p>
2729

2830
#### Supported Linux Operation Systems:
29-
<p align="left"> <a href="https://alpinelinux.org/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/7600810?s=200&v=4" alt="alpine linux" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
31+
<p align="left">
32+
<a href="https://alpinelinux.org/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/7600810?s=200&v=4" alt="alpine linux" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
3033
<a href="https://fedoraproject.org/" target="_blank" rel="noreferrer"> <img src="https://raw.githubusercontent.com/github/explore/e6b1e7f0fb8d0bf920bd719c7289243138bdc1b4/topics/fedora/fedora.png" alt="fedora" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
3134
<a href="https://www.centos.org/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/79192?s=200&v=4" alt="centos" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
3235
<a href="https://www.debian.org/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/1854028?s=200&v=4" alt="debian" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
3336
<a href="https://ubuntu.com/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/4604537?s=200&v=4" alt="ubuntu" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
3437
<a href="https://www.raspberrypi.com/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/1294177?s=200&v=4" alt="ubuntu" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
3538
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/33972111?s=200&v=4" alt="redhat on s390x (IBM Z)" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
3639
<a href="https://www.suse.com/products/server/" target="_blank" rel="noreferrer"> <img src="https://avatars.githubusercontent.com/u/623819?s=200&v=4" alt="opensuse on s390x (IBM Z)" height="40" width="40"/> </a>&nbsp;&nbsp;&nbsp;
37-
<a href="https://archlinux.org/" target="_blank" rel="noreferrer"> <img src="https://gitlab.archlinux.org/uploads/-/system/group/avatar/23/iconfinder_archlinux_386451.png?width=48" alt="arch linux" height="40" width="40"/> </a> </p>
40+
<a href="https://archlinux.org/" target="_blank" rel="noreferrer"> <img src="https://gitlab.archlinux.org/uploads/-/system/group/avatar/23/iconfinder_archlinux_386451.png?width=48" alt="arch linux" height="40" width="40"/> </a>
41+
</p>
3842

3943
##### Note: Fedora 37, 39 and alpine linux x86-64 compatible, could not try sles IBM Z s390x, rhel IBM Z s390x and raspberrypi.
4044

@@ -44,7 +48,7 @@ Plus, manage docker containers with Portainer.
4448
- [webserver (apache2/httpd)](https://hub.docker.com/_/httpd)
4549
- [certbot (letsencrypt)](https://hub.docker.com/r/certbot/certbot)
4650
- [phpMyAdmin](https://hub.docker.com/r/phpmyadmin/phpmyadmin/)
47-
- [databaseMariadb](https://hub.docker.com/_/mariadb) [databaseMysql](https://hub.docker.com/_/mysql)
51+
- [Mariadb](https://hub.docker.com/_/mariadb) [Mysql](https://hub.docker.com/_/mysql)
4852
- [redis](https://hub.docker.com/_/redis)
4953
- [backup](https://hub.docker.com/r/offen/docker-volume-backup)
5054

@@ -63,8 +67,10 @@ Create rules to open ports to the internet, or to a specific IPv4 address or ran
6367
#### Contents:
6468

6569
- [Auto Configuration and Installation](#automatic)
66-
- [Requirements](#requirements)
6770
- [Manual Configuration and Installation](#manual)
71+
- [Requirements](#requirements)
72+
- [Configuration](#configuration)
73+
- [Installation](#installation)
6874
- [Portainer Installation](#portainer)
6975
- [Usage](#usage)
7076
- [Website](#website)
@@ -74,9 +80,9 @@ Create rules to open ports to the internet, or to a specific IPv4 address or ran
7480
- [phpMyAdmin](#phpmyadmin)
7581
- [backup](#backup)
7682

77-
## Automatic
83+
### Automatic
7884

79-
### Exec install shell script for auto installation and configuration
85+
#### Exec install shell script for auto installation and configuration
8086

8187
download with
8288

@@ -92,7 +98,9 @@ chmod +x install.sh
9298
./install.sh
9399
```
94100

95-
## Requirements
101+
### Manual
102+
103+
#### Requirements
96104

97105
Make sure you have the latest versions of **Docker** and **Docker Compose** installed on your machine.
98106

@@ -103,9 +111,7 @@ Clone this repository or copy the files from this repository into a new folder.
103111

104112
Make sure to [add your user to the `docker` group](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user).
105113

106-
## Manual
107-
108-
### Configuration
114+
#### Configuration
109115

110116
download with
111117

@@ -125,31 +131,86 @@ Copy the example environment into `.env`
125131
cp env.example .env
126132
```
127133

128-
Edit the `.env` file to change values of ```LOCAL_TIMEZONE```, ```DOMAIN_NAME```, ```DIRECTORY_PATH```, ```LETSENCRYPT_EMAIL```, ```DB_USER```, ```DB_PASSWORD```, ```DB_NAME```, ```MYSQL_ROOT_PASSWORD```, ```DATABASE_IMAGE_NAME```, ```DATABASE_CONT_NAME```, ```DATABASE_PACKAGE_MANAGER```, ```DATABASE_AUTHENTICATION_PLUGIN```, ```DATABASE_ADMIN_COMMANDLINE```, ```PMA_CONTROLUSER```, ```PMA_CONTROLPASS```, ```PMA_HTPASSWD_USERNAME``` and ```PMA_HTPASSWD_PASSWORD```.
134+
Edit the `.env` file to change values of
135+
136+
|```LOCAL_TIMEZONE```|```DOMAIN_NAME```|```DIRECTORY_PATH```|```LETSENCRYPT_EMAIL```|
137+
|```DB_USER```|```DB_PASSWORD```|```DB_NAME```|```MYSQL_ROOT_PASSWORD```|```DATABASE_IMAGE_NAME```|
138+
|```DATABASE_CONT_NAME```|```DATABASE_PACKAGE_MANAGER```|```DATABASE_ADMIN_COMMANDLINE```|```PMA_CONTROLUSER```|```PMA_CONTROLPASS```|
139+
|```PMA_HTPASSWD_USERNAME```|```PMA_HTPASSWD_PASSWORD```|```SSL_SNIPPET```|
140+
141+
<table><thead>
142+
<tr>
143+
<th>Variable </th>
144+
<th colspan="2">Value</th>
145+
</tr></thead>
146+
<tbody>
147+
<tr>
148+
<td><code>LOCAL_TIMEZONE</code></td>
149+
<td colspan="2"><code><a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List" rel="nofollow">to see local timezones</a></code></td>
150+
</tr>
151+
<tr>
152+
<td><code>DIRECTORY_PATH</code></td>
153+
<td colspan="2"><code>pwd</code> at command line</td>
154+
</tr>
155+
<tr>
156+
<td><code>DATABASE_IMAGE_NAME</code></td>
157+
<td colspan="2"><code>mariadb</code> or <code>mysql</code></td>
158+
</tr>
159+
<tr>
160+
<td><code>DATABASE_CONT_NAME</code></td>
161+
<td colspan="2"><code>mariadb</code>, <code>mysql</code> or <code><a href="https://docs.docker.com/reference/compose-file/services/#container_name" rel="nofollow" alt="custom name">custom name</a></code></td>
162+
</tr>
163+
<tr>
164+
<td rowspan="2"><code>DATABASE_PACKAGE_MANAGER</code></td>
165+
<td>mariadb</td>
166+
<td><code>apt-get update && apt-get install -y gettext-base</code></td>
167+
</tr>
168+
<tr>
169+
<td>mysql</td>
170+
<td><code>microdnf install -y gettext</code></td>
171+
</tr>
172+
<tr>
173+
<td rowspan="2"><code>DATABASE_ADMIN_COMMANDLINE</code></td>
174+
<td>mariadb</td>
175+
<td><code>mariadb-admin</code></td>
176+
</tr>
177+
<tr>
178+
<td>mysql</td>
179+
<td><code>mysqladmin</code></td>
180+
</tr>
181+
<tr>
182+
<td rowspan="2"><code>SSL_SNIPPET</code></td>
183+
<td>localhost</td>
184+
<td><code>echo 'Generated Self-signed SSL Certificate at localhost'</code></td>
185+
</tr>
186+
<tr>
187+
<td>remotehost</td>
188+
<td><code>certbot certonly --webroot --webroot-path /tmp/acme-challenge --rsa-key-size 4096 --non-interactive --agree-tos --no-eff-email --force-renewal --email ${LETSENCRYPT_EMAIL} -d ${DOMAIN_NAME} -d www.${DOMAIN_NAME}</code></td>
189+
</tr>
190+
</tbody>
191+
</table>
129192

130-
LOCAL_TIMEZONE=[to see local timezones](https://docs.diladele.com/docker/timezones.html)
193+
and
131194

132-
DIRECTORY_PATH=```pwd``` at command line\
133-
DATABASE_IMAGE_NAME=```mariadb``` or ```mysql```\
134-
DATABASE_CONT_NAME=```mariadb```, ```mysql``` or ```custom name```\
135-
DATABASE_PACKAGE_MANAGER=```apt-get update && apt-get install -y gettext-base``` for mariadb, ```microdnf install -y gettext``` for mysql\
136-
DATABASE_ADMIN_COMMANDLINE=```mariadb-admin``` for mariadb, ```mysqladmin``` for mysql\
137-
SSL_SNIPPET=```echo 'Generated Self-signed SSL Certificate for localhost'``` for localhost\
138-
SSL_SNIPPET=```certbot certonly --webroot --webroot-path /tmp/acme-challenge --rsa-key-size 4096 --non-interactive --agree-tos --no-eff-email --force-renewal --email ${LETSENCRYPT_EMAIL} -d ${DOMAIN_NAME} -d www.${DOMAIN_NAME}``` for remotehost
195+
```
196+
cp ./webserver/extra/httpd-ssl.conf.template ./webserver/extra/httpd-ssl.conf
197+
```
139198

140-
and
199+
change example.com to your domain name in ```./webserver/extra/httpd-ssl.conf``` file.
141200

142201
```
143202
cp ./phpmyadmin/apache2/sites-available/default-ssl.sample.conf ./phpmyadmin/apache2/sites-available/default-ssl.conf
144203
```
204+
145205
change example.com to your domain name in ```./phpmyadmin/apache2/sites-available/default-ssl.conf``` file.
146206

147207
```
148208
cp ./database/phpmyadmin/sql/create_tables.sql.template.example ./database/phpmyadmin/sql/create_tables.sql.template
149209
```
210+
150211
change pma_controluser and db_authentication_password in ```./database/phpmyadmin/sql/create_tables.sql.template``` file.
151212

152-
### Installation
213+
#### Installation
153214

154215
Firstly: will create external volume
155216

@@ -173,7 +234,7 @@ The containers are now built and running. You should be able to access the Symfo
173234

174235
For convenience you may add a new entry into your hosts file.
175236

176-
## Portainer
237+
### Portainer
177238

178239
```
179240
docker compose -f portainer-docker-compose.yml -p portainer up -d
@@ -183,91 +244,73 @@ manage docker with [Portainer](https://www.portainer.io/) is the definitive cont
183244

184245
You can also visit `https://example.com:9001` to access portainer after starting the containers.
185246

186-
## Usage
247+
### Usage
187248

188249
#### You could manage docker containers without command line with portainer.
189250

190-
### Show both running and stopped containers
191-
192-
The docker ps command only shows running containers by default. To see all containers, use the -a (or --all) flag:
251+
#### Here’s a quick reference of commonly used Docker Compose commands
193252

194253
```
195-
docker ps -a
254+
docker ps -a # Lists all containers managed by the compose file
196255
```
197256

198-
### Starting containers
199-
200-
You can start the containers with the `up` command in daemon mode (by adding `-d` as an argument) or by using the `start` command:
201-
202257
```
203-
docker compose start
258+
docker compose start # Starts previously stopped containers
204259
```
205260

206-
### Stopping containers
207-
208261
```
209-
docker compose stop
262+
docker compose stop # Stops all running containers
210263
```
211264

212-
### Removing containers
213-
214-
To stop and remove all the containers use the `down` command:
215-
216265
```
217-
docker compose down
266+
docker compose down # Stops and removes containers, networks, etc.
218267
```
219268

220-
to remove portainer and the other containers:
221-
222269
```
223-
docker rm -f $(docker ps -a -q)
270+
docker compose down -v # Add --volumes to remove volumes explicitly
224271
```
225272

226-
Use `-v` if you need to remove the database volume which is used to persist the database:
227-
228273
```
229-
docker compose down -v
274+
docker rm -f $(docker ps -a -q) # Removes portainer and the other containers
230275
```
231276

232-
to remove external certbot-etc and portainer and the other volumes:
233-
234277
```
235-
docker volume rm $(docker volume ls -q)
278+
docker volume rm $(docker volume ls -q) # Removes all volumes
236279
```
237280

238-
Delete all images, containers, volumes, and networks that are not associated with a container (dangling):
239-
240281
```
241-
docker system prune
282+
docker network prune # Remove all unused networks
242283
```
243284

244-
To additionally remove any stopped containers and all unused images (not just dangling ones), add the -a flag to the command:
285+
```
286+
docker system prune # Removes unused data (containers, networks, images, and optionally volumes)
287+
```
245288

246289
```
247-
docker system prune -a
290+
docker system prune -a # Removes all unused images, not just dangling ones
248291
```
249292

250-
to remove portainer and the other images:
293+
```
294+
docker rmi $(docker image ls -q) # Removes portainer and the other images
295+
```
251296

252297
```
253-
docker rmi $(docker image ls -q)
298+
docker container logs container_name_or_id # Shows logs from all services
254299
```
255300

256-
### Project from existing source
301+
#### Project from existing source
257302

258303
Copy all files into a new directory:
259304

260-
You can now use the `up` command:
261-
262305
```
263-
docker compose up -d
306+
docker compose up -d # Starts services in detached mode (in the background)
264307
```
265308

266-
### Docker run reference
309+
#### Docker run reference
267310

268-
[https://docs.docker.com/engine/reference/run/](https://docs.docker.com/engine/reference/run/)
311+
[https://docs.docker.com/reference/cli/docker/compose/](https://docs.docker.com/reference/cli/docker/compose/)
269312

270-
### Website
313+
#### Website
271314

272315
You should see the "Welcome to Symfony..." page in your browser. If not, please check if your PHP installation satisfies Symfony's requirements.
273316

@@ -300,7 +343,7 @@ index:
300343
controller: App\Controller\DefaultController::index
301344
```
302345

303-
Then, in the project folder ```./symfony/src/Controller```, create the file DefaultController.php. Set the full contents of the file to be:
346+
Then, in the project folder ```./symfony/src/Controller```, create the file ```DefaultController.php```. Set the full contents of the file to be:
304347

305348
```
306349
<?php
@@ -350,7 +393,7 @@ $config['port'] = 6379;
350393
$config['timeout'] = 0;
351394
```
352395

353-
### phpMyAdmin
396+
#### phpMyAdmin
354397

355398
You can add your own custom config.inc.php settings (such as Configuration Storage setup) by creating a file named config.user.inc.php with the various user defined settings in it, and then linking it into the container using:
356399

@@ -362,10 +405,10 @@ You can also visit `https://example.com:9090` to access phpMyAdmin after startin
362405

363406
The first authorize screen(htpasswd;username or password) and phpmyadmin login screen the username and the password is the same as supplied in the `.env` file.
364407

365-
### backup
408+
#### backup
366409

367-
This will back up the all files and folders in database/dump sql and html volumes, once per day, and write it to ./backups with a filename like backup-2023年01月01日T10-18-00.tar.gz
410+
This will back up the all files and folders in database/dump sql and html volumes, once per day, and write it to ```./backups``` with a filename like backup-2023年01月01日T10-18-00.tar.gz
368411

369-
#### can run on a custom cron schedule
412+
##### can run on a custom cron schedule
370413

371414
```BACKUP_CRON_EXPRESSION: '20 01 * * *'``` the UTC timezone.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /