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 458229d

Browse files
inistal laravel setup with php. nginx, mysql, postgres, adminer, mysql
0 parents commit 458229d

File tree

4 files changed

+112
-0
lines changed

4 files changed

+112
-0
lines changed

‎configuration/nginx/conf.d/app.conf

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
server {
2+
listen 80;
3+
index index.php index.html;
4+
error_log /var/log/nginx/error.log;
5+
access_log /var/log/nginx/access.log;
6+
root /var/www/public;
7+
location ~ \.php$ {
8+
try_files $uri =404;
9+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
10+
#this name should be container name
11+
fastcgi_pass project_laravel:9000;
12+
fastcgi_index index.php;
13+
include fastcgi_params;
14+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
15+
fastcgi_param PATH_INFO $fastcgi_path_info;
16+
}
17+
location / {
18+
try_files $uri $uri/ /index.php?$query_string;
19+
gzip_static on;
20+
}
21+
}

‎configuration/php/local.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
upload_max_filesize=40M
2+
post_max_size=40M

‎docker-compose.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
version: "3.5"
2+
services:
3+
project_webserver:
4+
image: nginx
5+
container_name: project_webserver
6+
restart: always
7+
volumes:
8+
- ./laravel-app:/var/www
9+
- ./configuration/nginx/conf.d/:/etc/nginx/conf.d/
10+
# volumes_from:
11+
# - project_laravel
12+
ports:
13+
- 80:80
14+
- 443:443
15+
networks:
16+
- project-network
17+
links:
18+
- project_laravel
19+
project_laravel:
20+
build:
21+
context: ./laravel-app
22+
dockerfile: Dockerfile
23+
container_name: project_laravel
24+
# image: digitalocean.com/php
25+
volumes:
26+
- ./laravel-app:/var/www
27+
- ./configuration/php/local.ini:/usr/local/etc/php/conf.d/local.ini
28+
links:
29+
- project_postgres
30+
networks:
31+
- project-network
32+
project_phpmyadmin:
33+
image: phpmyadmin/phpmyadmin
34+
container_name: project_phpmyadmin
35+
ports:
36+
- 8182:80
37+
environment:
38+
- PMA_ARBITRARY=1
39+
- PMA_HOST=project_mysql
40+
restart: always
41+
depends_on:
42+
- project_mysql
43+
networks:
44+
- project-network
45+
project_mysql:
46+
image: mysql:5.7.22
47+
container_name: project_mysql
48+
restart: always
49+
# expose:
50+
# - 3306
51+
environment:
52+
- MYSQL_DATABASE=root
53+
- MYSQL_ROOT_PASSWORD=Pro@123
54+
- MYSQL_USER=demo
55+
- MYSQL_PASSWORD=demo
56+
ports:
57+
- 3306:3306
58+
volumes:
59+
- ./dbdata/mysql:/var/lib/mysql
60+
networks:
61+
- project-network
62+
project_postgres:
63+
image: postgres
64+
container_name: project_postgres
65+
restart: always
66+
environment:
67+
- POSTGRES_DB=postgres
68+
- POSTGRES_USER=postgres
69+
- POSTGRES_PASSWORD=Pro@123
70+
volumes:
71+
- ./dbdata/postgres:/var/lib/postgresql/data
72+
networks:
73+
- project-network
74+
project_adminer:
75+
image: adminer
76+
container_name: project_adminer
77+
restart: always
78+
ports:
79+
- 8080:8080
80+
networks:
81+
- project-network
82+
networks:
83+
project-network:
84+
driver: bridge
85+
# #Volumes
86+
# volumes:
87+
# dbdata:
88+
# driver: local

‎laravel-app

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 2a1f3761e89df690190e9f50a6b4ac5ebb8b35a3

0 commit comments

Comments
(0)

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