File tree Expand file tree Collapse file tree 5 files changed +88
-0
lines changed Expand file tree Collapse file tree 5 files changed +88
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Ignore system files
2
+ .DS_Store
3
+ Thumbs.db
4
+
5
+ # Ignore composer dependencies
6
+ /vendor
Original file line number Diff line number Diff line change
1
+ FROM php:8.2-fpm as php-fpm
2
+ WORKDIR /var/www/html
3
+
4
+ COPY ./ ./
5
+
6
+ FROM nginx:1.25 as nginx
7
+ COPY ./nginx.conf /etc/nginx/nginx.conf
8
+
9
+ FROM mysql:8.0 as mysql
Original file line number Diff line number Diff line change
1
+ version : " 3.8"
2
+
3
+ services :
4
+ php-fpm :
5
+ build :
6
+ context : .
7
+ target : php-fpm
8
+ image : cycleops/php-demo:php-fpm
9
+ ports :
10
+ - 9000:9000
11
+ volumes :
12
+ - ./www/html/:/var/www/html/
13
+
14
+ nginx :
15
+ build :
16
+ context : .
17
+ target : nginx
18
+ image : cycleops/php-demo:nginx
19
+ ports :
20
+ - 80:80
21
+ volumes :
22
+ - ./nginx.conf:/etc/nginx/nginx.conf
23
+ - ./www/html/:/var/www/html/
24
+ restart : on-failure
25
+
26
+ mysql :
27
+ image : mysql:8.0
28
+ volumes :
29
+ - mysql_data:/var/lib/mysql
30
+ environment :
31
+ MYSQL_ROOT_PASSWORD : rootpassword
32
+ MYSQL_DATABASE : mydatabase
33
+ MYSQL_USER : myuser
34
+ MYSQL_PASSWORD : mypassword
35
+
36
+ volumes :
37
+ mysql_data:
Original file line number Diff line number Diff line change
1
+ worker_processes 1 ;
2
+
3
+ events {
4
+ worker_connections 1024 ;
5
+ }
6
+
7
+ http {
8
+ server {
9
+ listen 80 ;
10
+ server_name localhost;
11
+ root /var/www/html;
12
+
13
+ index index.php index.html index.htm;
14
+
15
+ location / {
16
+ try_files $uri $uri / /index.php?$query_string ;
17
+ }
18
+
19
+ location ~ \.php$ {
20
+ include fastcgi_params;
21
+ fastcgi_intercept_errors on ;
22
+ fastcgi_pass php-fpm:9000;
23
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name ;
24
+ }
25
+ }
26
+ }
27
+
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ <head>
3
+ <title>Cycleops</title>
4
+ </head>
5
+
6
+ <body>
7
+ <h1>Welcome to Cycleops</h1>
8
+ <p><?php echo 'We are running PHP, version: ' . phpversion (); ?> </p>
9
+ </body>
You can’t perform that action at this time.
0 commit comments