Skip to content

Commit f204d0b

Browse files
committed
dockerfile
1 parent 8f522a1 commit f204d0b

File tree

88 files changed

+146
-48
lines changed

Some content is hidden

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

88 files changed

+146
-48
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ yarn-error.log
1717
/.fleet
1818
/.idea
1919
/.vscode
20+
21+
db_compose.yml
22+
cghooks.lock

CHANGELOG.md

-46
This file was deleted.

README.md

100644100755
File mode changed.

app/Console/Kernel.php

100644100755
File mode changed.

app/Exceptions/Handler.php

100644100755
File mode changed.

app/Http/Controllers/Controller.php

100644100755
File mode changed.

app/Http/Kernel.php

100644100755
File mode changed.

app/Http/Middleware/Authenticate.php

100644100755
File mode changed.

app/Http/Middleware/EncryptCookies.php

100644100755
File mode changed.

app/Http/Middleware/PreventRequestsDuringMaintenance.php

100644100755
File mode changed.

app/Http/Middleware/RedirectIfAuthenticated.php

100644100755
File mode changed.

app/Http/Middleware/TrimStrings.php

100644100755
File mode changed.

app/Http/Middleware/TrustHosts.php

100644100755
File mode changed.

app/Http/Middleware/TrustProxies.php

100644100755
File mode changed.

app/Http/Middleware/ValidateSignature.php

100644100755
File mode changed.

app/Http/Middleware/VerifyCsrfToken.php

100644100755
File mode changed.

app/Models/User.php

100644100755
File mode changed.

app/Providers/AppServiceProvider.php

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ public function register(): void
1919
*/
2020
public function boot(): void
2121
{
22-
//
22+
2323
}
2424
}

app/Providers/AuthServiceProvider.php

100644100755
File mode changed.

app/Providers/BroadcastServiceProvider.php

100644100755
File mode changed.

app/Providers/EventServiceProvider.php

100644100755
File mode changed.

app/Providers/RouteServiceProvider.php

100644100755
File mode changed.

bootstrap/app.php

100644100755
File mode changed.

bootstrap/cache/.gitignore

100644100755
File mode changed.

cghooks.lock

-1
This file was deleted.

composer.json

100644100755
File mode changed.

composer.lock

100644100755
File mode changed.

config/app.php

100644100755
File mode changed.

config/auth.php

100644100755
File mode changed.

config/broadcasting.php

100644100755
File mode changed.

config/cache.php

100644100755
File mode changed.

config/cors.php

100644100755
File mode changed.

config/database.php

100644100755
File mode changed.

config/filesystems.php

100644100755
File mode changed.

config/hashing.php

100644100755
File mode changed.

config/logging.php

100644100755
File mode changed.

config/mail.php

100644100755
File mode changed.

config/queue.php

100644100755
File mode changed.

config/sanctum.php

100644100755
File mode changed.

config/services.php

100644100755
File mode changed.

config/session.php

100644100755
File mode changed.

config/view.php

100644100755
File mode changed.

database/.gitignore

100644100755
File mode changed.

database/factories/UserFactory.php

100644100755
File mode changed.

database/migrations/2014_10_12_000000_create_users_table.php

100644100755
File mode changed.

database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php

100644100755
File mode changed.

database/migrations/2019_08_19_000000_create_failed_jobs_table.php

100644100755
File mode changed.

database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php

100644100755
File mode changed.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
return new class extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*/
12+
public function up(): void
13+
{
14+
Schema::create('abs', function (Blueprint $table) {
15+
$table->id();
16+
$table->timestamps();
17+
});
18+
}
19+
20+
/**
21+
* Reverse the migrations.
22+
*/
23+
public function down(): void
24+
{
25+
Schema::dropIfExists('abs');
26+
}
27+
};

database/seeders/DatabaseSeeder.php

100644100755
File mode changed.

deploy.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#! /bin/bash
2+
3+
docker build \
4+
--platform=linux/amd64 \
5+
--file=docker/dockerfiles/app.Dockerfile \
6+
--tag="laravel_friend:dev" .

docker/config/nginx/app.conf

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
server {
2+
listen 81 default_server;
3+
listen [::]:81 default_server;
4+
5+
root /var/www/app/public;
6+
index index.php index.html index.htm index.nginx-debian.html;
7+
8+
9+
server_name localhost;
10+
11+
location / {
12+
try_files $uri $uri/ /index.php?$args;
13+
}
14+
15+
location ~ \.php$ {
16+
include fastcgi_params;
17+
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
18+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
19+
fastcgi_param PATH_INFO $fastcgi_path_info;
20+
}
21+
}

docker/config/php/php.ini

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[PHP]
2+
post_max_size = 100M
3+
upload_max_filesize = 100M
4+
variables_order = EGPCS
5+
6+
[opcache]
7+
opcache.enable_cli=1
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[supervisord]
2+
nodaemon=true
3+
4+
[program:nginx]
5+
command=/usr/sbin/nginx -g "daemon off;"
6+
autostart=true
7+
autorestart=true
8+
stdout_logfile=/dev/stdout
9+
stdout_logfile_maxbytes=0
10+
11+
[program:php-fpm]
12+
command=/usr/sbin/php-fpm8.1 -F
13+
autostart=true
14+
autorestart=true
15+
stdout_logfile=/dev/stdout
16+
stdout_logfile_maxbytes=0

docker/dockerfiles/app.Dockerfile

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
FROM ubuntu:latest
2+
3+
ENV TZ=Europe/Minsk
4+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
5+
6+
# Update the package list and install necessary packages
7+
RUN apt-get update && \
8+
apt-get install -y php8.1-fpm curl zip unzip supervisor && \
9+
apt-get clean && \
10+
rm -rf /var/lib/apt/lists/*
11+
12+
13+
RUN apt-get update && apt-get install -y software-properties-common
14+
RUN add-apt-repository ppa:ondrej/php && apt-get update
15+
RUN apt-get install -y php8.1-bcmath \
16+
php8.1-ctype \
17+
php8.1-fileinfo \
18+
php8.1-mbstring \
19+
php8.1-pdo \
20+
php8.1-tokenizer \
21+
php8.1-xml \
22+
php8.1-dom \
23+
php8.1-mysql
24+
25+
26+
# Install nginx and configure.
27+
RUN apt-get update \
28+
&& apt-get install -y nginx
29+
30+
COPY ./docker/config/nginx/app.conf /etc/nginx/sites-enabled/app.conf
31+
32+
# Configure Supervisor
33+
COPY ./docker/config/supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
34+
35+
# Install Composer.
36+
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
37+
# && mv /usr/local/bin/composer.phar /usr/local/bin/composer
38+
39+
# Set working directory
40+
WORKDIR /var/www/app
41+
42+
# Copy project code inside working directory.
43+
COPY . .
44+
45+
# Install dependencies with Composer
46+
RUN composer install --no-interaction --no-dev --prefer-dist --ignore-platform-req=ext-dom
47+
48+
49+
# Generate the application key.
50+
RUN php artisan key:generate
51+
52+
# Expose port 80 for Nginx
53+
EXPOSE 81
54+
55+
# Start Supervisor to manage Nginx and PHP-FPM processes
56+
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<html><p>laravel friend</p></html>

package.json

100644100755
File mode changed.

phpunit.xml

100644100755
File mode changed.

pint.json

100644100755
File mode changed.

public/.htaccess

100644100755
File mode changed.

public/favicon.ico

100644100755
File mode changed.

public/index.php

100644100755
File mode changed.

public/robots.txt

100644100755
File mode changed.

resources/css/app.css

100644100755
File mode changed.

resources/js/app.js

100644100755
File mode changed.

resources/js/bootstrap.js

100644100755
File mode changed.

resources/views/welcome.blade.php

100644100755
File mode changed.

routes/api.php

100644100755
File mode changed.

routes/channels.php

100644100755
File mode changed.

routes/console.php

100644100755
File mode changed.

routes/web.php

100644100755
File mode changed.

src/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<html><p>src</p></html>

src/index.php

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
phpinfo();

start_db.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
curl -o db_compose.yml -LJO https://raw.githubusercontent.com/code4mk/compose-hub/main/db/mysql-phpmyadmin/compose.yml
2+
3+
docker compose \
4+
--file db_compose.yml \
5+
up -d

storage/app/.gitignore

100644100755
File mode changed.

storage/app/public/.gitignore

100644100755
File mode changed.

storage/framework/.gitignore

100644100755
File mode changed.

storage/framework/cache/.gitignore

100644100755
File mode changed.

storage/framework/cache/data/.gitignore

100644100755
File mode changed.

storage/framework/sessions/.gitignore

100644100755
File mode changed.

storage/framework/testing/.gitignore

100644100755
File mode changed.

storage/framework/views/.gitignore

100644100755
File mode changed.

storage/logs/.gitignore

100644100755
File mode changed.

tests/CreatesApplication.php

100644100755
File mode changed.

tests/Feature/ExampleTest.php

100644100755
File mode changed.

tests/TestCase.php

100644100755
File mode changed.

tests/Unit/ExampleTest.php

100644100755
File mode changed.

vite.config.js

100644100755
File mode changed.

0 commit comments

Comments
 (0)