Init New flavor
parent
ef60d3f5fb
commit
8672123ef0
@ -0,0 +1,39 @@
|
|||||||
|
FROM php:8.1-fpm
|
||||||
|
|
||||||
|
# Arguments defined in docker-compose.yml
|
||||||
|
ARG user
|
||||||
|
ARG uid
|
||||||
|
|
||||||
|
# Install system dependencies
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
git \
|
||||||
|
curl \
|
||||||
|
libpng-dev \
|
||||||
|
libonig-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
libzip-dev \
|
||||||
|
zip \
|
||||||
|
unzip \
|
||||||
|
libpq-dev \
|
||||||
|
libgmp-dev \
|
||||||
|
vim-nox \
|
||||||
|
iputils-ping
|
||||||
|
|
||||||
|
# Clear cache
|
||||||
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install PHP extensions
|
||||||
|
RUN docker-php-ext-install pdo mysqli pdo_mysql mbstring exif pcntl bcmath gd intl zip pgsql pdo_pgsql
|
||||||
|
|
||||||
|
# Get latest Composer
|
||||||
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
|
# Create system user to run Composer and Artisan Commands
|
||||||
|
RUN useradd -G www-data,root -u $uid -d /home/$user $user
|
||||||
|
RUN mkdir -p /home/$user/.composer && \
|
||||||
|
chown -R $user:$user /home/$user
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /var/www
|
||||||
|
|
||||||
|
USER $user
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,22 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
index index.php index.html;
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
root /var/www/public;
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
try_files $uri =404;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_pass app:9000;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
gzip_static on;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
version: "3.7"
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
build:
|
||||||
|
args:
|
||||||
|
user: aji
|
||||||
|
uid: 1000
|
||||||
|
context: ./
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
image: monitordoc
|
||||||
|
container_name: monitordoc-app
|
||||||
|
working_dir: /var/www/
|
||||||
|
volumes:
|
||||||
|
- ./:/var/www
|
||||||
|
- ./user.ini:/usr/local/etc/php/php.ini
|
||||||
|
networks:
|
||||||
|
- monitordoc
|
||||||
|
nginx:
|
||||||
|
image: nginx:1.17-alpine
|
||||||
|
container_name: monitordoc-nginx
|
||||||
|
ports:
|
||||||
|
- 8000:80
|
||||||
|
volumes:
|
||||||
|
- ./:/var/www
|
||||||
|
- ./default.conf:/etc/nginx/conf.d/default.conf
|
||||||
|
networks:
|
||||||
|
- monitordoc
|
||||||
|
monitordocdb:
|
||||||
|
image: mariadb:latest
|
||||||
|
container_name: monitordocdb
|
||||||
|
ports:
|
||||||
|
- 3306:3306
|
||||||
|
volumes:
|
||||||
|
- ./database:/database
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: password
|
||||||
|
networks:
|
||||||
|
monitordoc:
|
||||||
|
ipv4_address: 10.4.0.99
|
||||||
|
networks:
|
||||||
|
monitordoc:
|
||||||
|
driver: bridge
|
||||||
|
ipam:
|
||||||
|
driver: default
|
||||||
|
config:
|
||||||
|
- subnet: 10.4.0.0/24
|
||||||
|
gateway: 10.4.0.1
|
@ -0,0 +1,30 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Link } from '@inertiajs/inertia-react';
|
||||||
|
|
||||||
|
export function NavItem({ href, active, children }) {
|
||||||
|
return (
|
||||||
|
<Link
|
||||||
|
href={href}
|
||||||
|
className={`btn btn-ghost rounded-btn ${active ? 'btn-active' : ''}`}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</Link>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function NavDropdown({ name, items }) {
|
||||||
|
const active = items.find(act => act.route === route().current())
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="dropdown">
|
||||||
|
<label tabIndex={0} className={`btn btn-ghost rounded-btn ${active ? 'btn-active' : ''}`}>{name}</label>
|
||||||
|
<ul tabIndex={0} className="menu dropdown-content p-2 shadow bg-base-100 rounded-box w-52 mt-4">
|
||||||
|
{items.map((item, index) => (
|
||||||
|
<li key={index}>
|
||||||
|
<Link href={route(item.route)}>{item.label}{route}</Link>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
Loading…
Reference in New Issue