add docker compose
This commit is contained in:
parent
3bc68538fe
commit
a7b0399740
82
.env
Normal file
82
.env
Normal file
@ -0,0 +1,82 @@
|
||||
APP_NAME="Vendor Management System"
|
||||
APP_ENV=production
|
||||
APP_KEY=base64:1FUbOjr2nDygkWQ7nCkAnECVPn5Q0rTh3637ZKyHoNI=
|
||||
APP_DEBUG=false
|
||||
APP_TIMEZONE=Asia/Jakarta
|
||||
#APP_URL=http://localhost
|
||||
APP_URL=https://vemanis.rsabhk.co.id
|
||||
|
||||
APP_FORCE_HTTPS=true
|
||||
CAPTCHA_DISABLE=false
|
||||
|
||||
APP_LOCALE=id
|
||||
APP_FALLBACK_LOCALE=id
|
||||
APP_FAKER_LOCALE=en_US
|
||||
|
||||
APP_MAINTENANCE_DRIVER=file
|
||||
# APP_MAINTENANCE_STORE=database
|
||||
|
||||
BCRYPT_ROUNDS=12
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_STACK=single
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=vms-mysql
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=vms_v1_db
|
||||
DB_USERNAME=vms-apps
|
||||
DB_PASSWORD="32Yd4#uQ5i"
|
||||
|
||||
SESSION_DRIVER=database
|
||||
SESSION_LIFETIME=120
|
||||
SESSION_ENCRYPT=false
|
||||
SESSION_PATH=/
|
||||
SESSION_DOMAIN=null
|
||||
|
||||
BROADCAST_CONNECTION=log
|
||||
FILESYSTEM_DISK=s3
|
||||
#FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=database
|
||||
|
||||
CACHE_STORE=database
|
||||
CACHE_PREFIX=
|
||||
|
||||
MEMCACHED_HOST=127.0.0.1
|
||||
|
||||
REDIS_CLIENT=phpredis
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=mail.rsabhk.co.id
|
||||
MAIL_PORT=25
|
||||
MAIL_USERNAME=ulp@rsabhk.co.id
|
||||
MAIL_PASSWORD=Sparman87**
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS="ulp@rsabhk.co.id"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
AWS_ACCESS_KEY_ID=nDx4XEshSQPET8jbWDGL
|
||||
AWS_SECRET_ACCESS_KEY=ZE5dcjYBkN8wv5s0sP6idUiz6cmQl1g8KNJlRBSe
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=vms-vemanis
|
||||
AWS_URL=https://minio-2.rsabhk.co.id:90
|
||||
AWS_ENDPOINT=https://minio-2.rsabhk.co.id:90
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=true
|
||||
|
||||
FTP_HOST=host
|
||||
FTP_USERNAME=username
|
||||
FTP_PASSWORD=password
|
||||
FTP_PORT=21
|
||||
FTP_ROOT_DIR="vms"
|
||||
FTP_PASSIVE_MODE=true
|
||||
FTP_SSL=false
|
||||
FTP_TIMEOUT=30
|
||||
FTP_VISIBILITY=public
|
||||
FTP_HTTP_URL=urlftp
|
||||
|
||||
VITE_APP_NAME="${APP_NAME}"
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
vendor-management-system/
|
||||
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
FROM php:8.2-apache-bookworm
|
||||
RUN apt-get update && apt-get install -y libicu-dev libzip-dev icu-devtools libpng-dev libpq-dev zlib1g-dev zlib1g libmcrypt-dev nano default-mysql-client
|
||||
RUN apt-get install -y libjpeg62-turbo-dev libfreetype6-dev libpng-dev
|
||||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
|
||||
RUN docker-php-ext-install -j$(nproc) gd intl mysqli pdo_mysql zip opcache ftp
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
|
||||
RUN apt-get install -y nodejs=18.15.0-1nodesource1
|
||||
RUN useradd -ms /bin/bash vms
|
||||
RUN a2enmod rewrite remoteip
|
||||
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
|
||||
RUN sed -i 's/${APACHE_RUN_USER:=www-data}/${APACHE_RUN_USER:=vms}/' /etc/apache2/envvars && \
|
||||
sed -i 's/${APACHE_RUN_GROUP:=www-data}/${APACHE_RUN_GROUP:=vms}/' /etc/apache2/envvars && \
|
||||
sed -i 's|/var/www/html|/var/www/html/public|' /etc/apache2/sites-available/000-default.conf && \
|
||||
sed -i 's/;date.timezone =/date.timezone = Asia\/Jakarta/' /usr/local/etc/php/php.ini && \
|
||||
sed -i 's/;error_log = php_errors.log/error_log = \/var\/www\/html\/logs\/php_errors.log/' /usr/local/etc/php/php.ini && \
|
||||
sed -i 's/memory_limit = 128M/memory_limit = 512M/' /usr/local/etc/php/php.ini && \
|
||||
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 64M/' /usr/local/etc/php/php.ini && \
|
||||
sed -i 's/post_max_size = 8M/post_max_size = 64M/' /usr/local/etc/php/php.ini
|
||||
119
config/mail.php
Normal file
119
config/mail.php
Normal file
@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Mailer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default mailer that is used to send all email
|
||||
| messages unless another mailer is explicitly specified when sending
|
||||
| the message. All additional mailers can be configured within the
|
||||
| "mailers" array. Examples of each type of mailer are provided.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('MAIL_MAILER', 'log'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mailer Configurations
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure all of the mailers used by your application plus
|
||||
| their respective settings. Several examples have been configured for
|
||||
| you and you are free to add your own as your application requires.
|
||||
|
|
||||
| Laravel supports a variety of mail "transport" drivers that can be used
|
||||
| when delivering an email. You may specify which one you're using for
|
||||
| your mailers below. You may also add additional mailers if needed.
|
||||
|
|
||||
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
|
||||
| "postmark", "resend", "log", "array",
|
||||
| "failover", "roundrobin"
|
||||
|
|
||||
*/
|
||||
|
||||
'mailers' => [
|
||||
|
||||
'smtp' => [
|
||||
'transport' => 'smtp',
|
||||
'url' => env('MAIL_URL'),
|
||||
'host' => env('MAIL_HOST', '127.0.0.1'),
|
||||
'port' => env('MAIL_PORT', 2525),
|
||||
'encryption' => env('MAIL_ENCRYPTION', 'null'),
|
||||
'username' => env('MAIL_USERNAME'),
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
'timeout' => null,
|
||||
'auth_mode' => null,
|
||||
'verify_peer' => false,
|
||||
'auto_tls' => false, // Important this line
|
||||
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
'transport' => 'ses',
|
||||
],
|
||||
|
||||
'postmark' => [
|
||||
'transport' => 'postmark',
|
||||
// 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'),
|
||||
// 'client' => [
|
||||
// 'timeout' => 5,
|
||||
// ],
|
||||
],
|
||||
|
||||
'resend' => [
|
||||
'transport' => 'resend',
|
||||
],
|
||||
|
||||
'sendmail' => [
|
||||
'transport' => 'sendmail',
|
||||
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
|
||||
],
|
||||
|
||||
'log' => [
|
||||
'transport' => 'log',
|
||||
'channel' => env('MAIL_LOG_CHANNEL'),
|
||||
],
|
||||
|
||||
'array' => [
|
||||
'transport' => 'array',
|
||||
],
|
||||
|
||||
'failover' => [
|
||||
'transport' => 'failover',
|
||||
'mailers' => [
|
||||
'smtp',
|
||||
'log',
|
||||
],
|
||||
],
|
||||
|
||||
'roundrobin' => [
|
||||
'transport' => 'roundrobin',
|
||||
'mailers' => [
|
||||
'ses',
|
||||
'postmark',
|
||||
],
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "From" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may wish for all emails sent by your application to be sent from
|
||||
| the same address. Here you may specify a name and address that is
|
||||
| used globally for all emails that are sent by your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'from' => [
|
||||
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||
],
|
||||
|
||||
];
|
||||
37
docker-compose.yml
Normal file
37
docker-compose.yml
Normal file
@ -0,0 +1,37 @@
|
||||
version: "3.7"
|
||||
services:
|
||||
web:
|
||||
image: registry1.rsabhk.co.id:5080/rsabhk/app-vemanis-php:latest
|
||||
# build:
|
||||
# context: .
|
||||
container_name: vms-web
|
||||
restart: always
|
||||
networks:
|
||||
- vms-networks
|
||||
ports:
|
||||
- "9045:80" #Change port binding web application
|
||||
volumes:
|
||||
- ./vendor-management-system:/var/www/html #Change volume binding (APPS) web application
|
||||
- ./config/mail.php:/var/www/html/config/mail.php
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
image: mysql:8.0-debian
|
||||
container_name: vms-mysql
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: "5#y72498uX" #Change root password mysql application
|
||||
MYSQL_DATABASE: "vms_v1_db" #Change database name mysql application
|
||||
MYSQL_USER: "vms-apps" #Change user mysql application
|
||||
MYSQL_PASSWORD: "32Yd4#uQ5i" #Change password mysql application
|
||||
networks:
|
||||
- vms-networks
|
||||
ports:
|
||||
- "3358:3306" #Change port binding mysql application
|
||||
volumes:
|
||||
- vms-mysql-data:/var/lib/mysql
|
||||
volumes:
|
||||
vms-mysql-data:
|
||||
networks:
|
||||
vms-networks:
|
||||
driver: bridge
|
||||
4
rebuild.sh
Executable file
4
rebuild.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#! /bin/bash
|
||||
docker build . -t app/vemanis-php:latest &&
|
||||
docker tag app/vemanis-php:latest registry1.rsabhk.co.id:5080/rsabhk/app-vemanis-php:latest &&
|
||||
docker push registry1.rsabhk.co.id:5080/rsabhk/app-vemanis-php:latest
|
||||
Loading…
x
Reference in New Issue
Block a user