Compare commits
7 Commits
feature/Ne
...
feature/Fi
| Author | SHA1 | Date | |
|---|---|---|---|
| d309c406ef | |||
| 048219f92e | |||
| d833f4dc0d | |||
| a7fce4ca94 | |||
| 5f19a26f67 | |||
| 4c6f6d66f4 | |||
| dff218541c |
72
Dockerfile
72
Dockerfile
@@ -1,58 +1,32 @@
|
||||
FROM alpine:3.18
|
||||
FROM dunglas/frankenphp:1.11.1-php8.2
|
||||
|
||||
RUN apk update && apk add --no-cache\
|
||||
bash \
|
||||
wget \
|
||||
curl \
|
||||
nano \
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends default-mysql-client \
|
||||
unzip \
|
||||
libzip-dev \
|
||||
libxml2 \
|
||||
libxml2-dev \
|
||||
git \
|
||||
zlib-dev \
|
||||
libpng-dev \
|
||||
php81 \
|
||||
php81-common \
|
||||
php81-fpm \
|
||||
php81-pdo \
|
||||
php81-opcache \
|
||||
php81-soap \
|
||||
php81-zip \
|
||||
php81-phar \
|
||||
php81-iconv \
|
||||
php81-cli \
|
||||
php81-curl \
|
||||
php81-openssl \
|
||||
php81-mbstring \
|
||||
php81-tokenizer \
|
||||
php81-fileinfo \
|
||||
php81-json \
|
||||
php81-xml \
|
||||
php81-xmlwriter \
|
||||
php81-xmlreader \
|
||||
php81-simplexml \
|
||||
php81-dom \
|
||||
php81-pdo_mysql \
|
||||
php81-pdo_pgsql \
|
||||
php81-pdo_sqlite \
|
||||
php81-tokenizer \
|
||||
php81-pecl-redis \
|
||||
php81-gd
|
||||
zip \
|
||||
&& install-php-extensions pdo_mysql \
|
||||
&& install-php-extensions zip \
|
||||
&& install-php-extensions gd \
|
||||
&& install-php-extensions pcntl \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
WORKDIR /var/www/rms
|
||||
|
||||
ENV COMPOSER_ALLOW_SUPERUSER=1
|
||||
# Copy Laravel application
|
||||
COPY . .
|
||||
|
||||
ARG MOUNT_PATH
|
||||
# Give permissions to storage and bootstrap/cache
|
||||
RUN chmod -R 777 storage bootstrap/cache
|
||||
|
||||
COPY . /var/www/app
|
||||
|
||||
WORKDIR /var/www/app
|
||||
# Install Composer
|
||||
COPY --from=docker.arvancloud.ir/composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Optional: Run migrations/seeds if you want
|
||||
# CMD php artisan migrate && php artisan db:seed && frankenphp run --config /etc/frankenphp/config.prod.yaml
|
||||
CMD composer install;\
|
||||
php artisan key:generate;\
|
||||
# php artisan migrate ;\
|
||||
# php artisan db:seed;\
|
||||
# php artisan storege:link;\
|
||||
php artisan serve --host=0.0.0.0
|
||||
php artisan migrate;\
|
||||
php artisan db:seed;\
|
||||
cd public;\
|
||||
frankenphp php-server
|
||||
@@ -37,8 +37,8 @@ class ReportTradodService
|
||||
-1 AS province_id,
|
||||
COUNT(m.id) AS total,
|
||||
COALESCE(SUM(m.mission_duration != m.in_area_duration), 0) AS khareg_mahdode,
|
||||
COALESCE(SUM(m.in_area_duration), 0) AS gps,
|
||||
COALESCE(SUM(m.mission_duration), 0) AS durations,
|
||||
SEC_TO_TIME(COALESCE(SUM(m.in_area_duration), 0)) AS gps,
|
||||
SEC_TO_TIME(COALESCE(SUM(m.mission_duration), 0)) AS durations,
|
||||
COALESCE(SUM(CASE WHEN m.type = 1 THEN 1 ELSE 0 END), 0) AS far_h,
|
||||
COALESCE(SUM(CASE WHEN m.type = 2 THEN 1 ELSE 0 END), 0) AS far_d,
|
||||
COALESCE(SUM(CASE WHEN m.type = 3 THEN 1 ELSE 0 END), 0) AS un_far_h,
|
||||
@@ -56,8 +56,8 @@ class ReportTradodService
|
||||
p.id AS province_id,
|
||||
COUNT(m.id) AS total,
|
||||
COALESCE(SUM(m.mission_duration != m.in_area_duration), 0) AS khareg_mahdode,
|
||||
COALESCE(SUM(m.in_area_duration), 0) AS gps,
|
||||
COALESCE(SUM(m.mission_duration), 0) AS durations,
|
||||
SEC_TO_TIME(COALESCE(SUM(m.in_area_duration), 0)) AS gps,
|
||||
SEC_TO_TIME(COALESCE(SUM(m.mission_duration), 0)) AS durations,
|
||||
COALESCE(SUM(CASE WHEN m.type = 1 THEN 1 ELSE 0 END), 0) AS far_h,
|
||||
COALESCE(SUM(CASE WHEN m.type = 2 THEN 1 ELSE 0 END), 0) AS far_d,
|
||||
COALESCE(SUM(CASE WHEN m.type = 3 THEN 1 ELSE 0 END), 0) AS un_far_h,
|
||||
@@ -98,8 +98,8 @@ class ReportTradodService
|
||||
-1 AS city_id,
|
||||
COUNT(m.id) AS total,
|
||||
COALESCE(SUM(m.mission_duration != m.in_area_duration), 0) AS khareg_mahdode,
|
||||
COALESCE(SUM(m.in_area_duration), 0) AS gps,
|
||||
COALESCE(SUM(m.mission_duration), 0) AS durations,
|
||||
SEC_TO_TIME(COALESCE(SUM(m.in_area_duration), 0)) AS gps,
|
||||
SEC_TO_TIME(COALESCE(SUM(m.mission_duration), 0)) AS durations,
|
||||
COALESCE(SUM(m.type = 1), 0) AS far_h,
|
||||
COALESCE(SUM(m.type = 2), 0) AS far_d,
|
||||
COALESCE(SUM(m.type = 3), 0) AS un_far_h,
|
||||
@@ -118,8 +118,8 @@ class ReportTradodService
|
||||
c.id AS city_id,
|
||||
COUNT(m.id) AS total,
|
||||
COALESCE(SUM(m.mission_duration != m.in_area_duration), 0) AS khareg_mahdode,
|
||||
COALESCE(SUM(m.in_area_duration), 0) AS gps,
|
||||
COALESCE(SUM(m.mission_duration), 0) AS durations,
|
||||
SEC_TO_TIME(COALESCE(SUM(m.in_area_duration), 0)) AS gps,
|
||||
SEC_TO_TIME(COALESCE(SUM(m.mission_duration), 0)) AS durations,
|
||||
COALESCE(SUM(m.type = 1), 0) AS far_h,
|
||||
COALESCE(SUM(m.type = 2), 0) AS far_d,
|
||||
COALESCE(SUM(m.type = 3), 0) AS un_far_h,
|
||||
|
||||
33
docker-compose.yml
Normal file
33
docker-compose.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:10.11.8
|
||||
container_name: rms-mariadb
|
||||
ports:
|
||||
- "3307:3306"
|
||||
environment:
|
||||
MARIADB_DATABASE: ${DB_DATABASE}
|
||||
MARIADB_USER: ${DB_USERNAME}
|
||||
MARIADB_PASSWORD: ${DB_PASSWORD}
|
||||
MARIADB_ROOT_PASSWORD: ${DB_PASSWORD}
|
||||
volumes:
|
||||
- /var/www/rmsdb:/var/lib/mysql
|
||||
networks:
|
||||
- rms
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: rms
|
||||
ports:
|
||||
- "8003:80"
|
||||
volumes:
|
||||
- ./:/var/www/rms
|
||||
depends_on:
|
||||
- mariadb
|
||||
networks:
|
||||
- rms
|
||||
|
||||
networks:
|
||||
rms:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user