DONE: fix error on nginx, add version on env, enable impersonate on staging
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
APP_NAME=Laravel
|
APP_NAME=Laravel
|
||||||
APP_ENV=staging
|
APP_ENV=staging
|
||||||
|
APP_VERSION=v2.2-staging
|
||||||
APP_KEY=base64:O1XZDqK4H6+3GdrODgCaLr2l+OoWvgVhYr0GJ1KizW8=
|
APP_KEY=base64:O1XZDqK4H6+3GdrODgCaLr2l+OoWvgVhYr0GJ1KizW8=
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_URL=http://172.16.6.200:8091
|
APP_URL=http://172.16.6.200:8091
|
||||||
|
|||||||
@@ -56,11 +56,11 @@ jobs:
|
|||||||
set -e
|
set -e
|
||||||
IMAGE_TAG="${{ inputs.image_tag }}"
|
IMAGE_TAG="${{ inputs.image_tag }}"
|
||||||
|
|
||||||
mkdir -p "${DEPLOY_DIR}/docker/nginx"
|
mkdir -p "${DEPLOY_DIR}/docker/nginx" "${DEPLOY_DIR}/public"
|
||||||
cp docker-compose.staging.yml "${DEPLOY_DIR}/docker-compose.yml"
|
cp docker-compose.staging.yml "${DEPLOY_DIR}/docker-compose.yml"
|
||||||
cp docker/nginx/default.conf "${DEPLOY_DIR}/docker/nginx/default.conf"
|
cp docker/nginx/default.conf "${DEPLOY_DIR}/docker/nginx/default.conf"
|
||||||
rm -rf "${DEPLOY_DIR}/public"
|
find "${DEPLOY_DIR}/public" -mindepth 1 -delete
|
||||||
cp -R public "${DEPLOY_DIR}/public"
|
cp -R public/. "${DEPLOY_DIR}/public/"
|
||||||
|
|
||||||
if [ ! -f "${DEPLOY_DIR}/.env.staging" ]; then
|
if [ ! -f "${DEPLOY_DIR}/.env.staging" ]; then
|
||||||
if [ -f .env.staging ]; then
|
if [ -f .env.staging ]; then
|
||||||
@@ -78,7 +78,7 @@ jobs:
|
|||||||
export IMAGE_TAG
|
export IMAGE_TAG
|
||||||
|
|
||||||
docker compose --env-file .env.staging -f docker-compose.yml pull app
|
docker compose --env-file .env.staging -f docker-compose.yml pull app
|
||||||
docker compose --env-file .env.staging -f docker-compose.yml up -d --no-build --remove-orphans
|
docker compose --env-file .env.staging -f docker-compose.yml up -d --no-build --force-recreate --remove-orphans app web
|
||||||
|
|
||||||
echo "✓ Deployed IMAGE_TAG=${IMAGE_TAG}"
|
echo "✓ Deployed IMAGE_TAG=${IMAGE_TAG}"
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ return [
|
|||||||
|
|
||||||
'name' => env('APP_NAME', 'Laravel'),
|
'name' => env('APP_NAME', 'Laravel'),
|
||||||
|
|
||||||
|
'version' => env('APP_VERSION', ''),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Application Environment
|
| Application Environment
|
||||||
|
|||||||
@@ -1,23 +1,8 @@
|
|||||||
# Staging stack — isolated from local docker-compose.yml (8081 / 3307)
|
|
||||||
# and from api_arrahn staging (8090 / 3308).
|
|
||||||
#
|
|
||||||
# Local:
|
|
||||||
# docker compose --env-file .env.staging -f docker-compose.staging.yml up -d --build
|
|
||||||
#
|
|
||||||
# CI (image already in registry):
|
|
||||||
# APP_IMAGE=git.koppkb.com/kopkb/kaunter IMAGE_TAG=<sha> \
|
|
||||||
# docker compose --env-file .env.staging -f docker-compose.staging.yml up -d --no-build
|
|
||||||
#
|
|
||||||
# Host nginx reverse-proxies the public domain to 127.0.0.1:${HTTP_PORT}.
|
|
||||||
# See docker/nginx/host-proxy.example.conf
|
|
||||||
#
|
|
||||||
# If 8091 or 3309 is already taken, set HTTP_PORT / MYSQL_PUBLISH_PORT in .env.staging.
|
|
||||||
|
|
||||||
name: kaunter_staging
|
name: kaunter_staging
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: ${APP_IMAGE:-kaunter}:${IMAGE_TAG:-staging}
|
image: ${APP_IMAGE:-git.koppkb.com/kopkb/kaunter}:${IMAGE_TAG:-staging}
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: docker/php/Dockerfile
|
dockerfile: docker/php/Dockerfile
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ server {
|
|||||||
client_max_body_size 50M;
|
client_max_body_size 50M;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ @php;
|
try_files $uri @php;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @php {
|
location @php {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<link rel="icon" href="{{ asset('img/icon_pkb.png') }}">
|
<link rel="icon" href="{{ asset('img/icon_pkb.png') }}">
|
||||||
|
|
||||||
<title>arOS v2.2</title>
|
<title>arOS {{ config('app.version') }}</title>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@keyframes slide {
|
@keyframes slide {
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
<div class="card-header pb-0 text-left">
|
<div class="card-header pb-0 text-left">
|
||||||
<div style="display: flex; justify-content:space-between; align-items:center">
|
<div style="display: flex; justify-content:space-between; align-items:center">
|
||||||
<h1 class="font-weight-bolder text-info text-gradient" style="word-break: break-word; white-space: nowrap;">
|
<h1 class="font-weight-bolder text-info text-gradient" style="word-break: break-word; white-space: nowrap;">
|
||||||
Kaunter arOS v2.2
|
Kaunter arOS {{ config('app.version') }}
|
||||||
</h1>
|
</h1>
|
||||||
<img src="{{ asset('img/icon_pkb.png') }}" alt="logo-arrahn" style="width: 85px; margin-left: 30px;">
|
<img src="{{ asset('img/icon_pkb.png') }}" alt="logo-arrahn" style="width: 85px; margin-left: 30px;">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
<a href="{{ route('kakitangan.tukarcawangan',['id'=>$staff->id]) }}" class="btn btn-info" title="Tukar Cawangan"><i class="material-icons">work</i></a>
|
<a href="{{ route('kakitangan.tukarcawangan',['id'=>$staff->id]) }}" class="btn btn-info" title="Tukar Cawangan"><i class="material-icons">work</i></a>
|
||||||
<a href="{{ route('operasi.kakitangan.edit',['id'=>$staff->id]) }}" class="btn btn-success" title="Edit Maklumat"><i class="material-icons">settings</i></a>
|
<a href="{{ route('operasi.kakitangan.edit',['id'=>$staff->id]) }}" class="btn btn-success" title="Edit Maklumat"><i class="material-icons">settings</i></a>
|
||||||
@if(
|
@if(
|
||||||
app()->environment('local')
|
app()->environment(['local', 'staging'])
|
||||||
&&
|
&&
|
||||||
in_array($auth_user->roles, ['admin'])
|
in_array($auth_user->roles, ['admin'])
|
||||||
&& $staff->roles != 'admin'
|
&& $staff->roles != 'admin'
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
<a href="{{ route('admin.kakitangan.edit',['id'=>$staff->id]) }}" class="btn btn-success" title="Edit Maklumat"><i class="material-icons">settings</i></a>
|
<a href="{{ route('admin.kakitangan.edit',['id'=>$staff->id]) }}" class="btn btn-success" title="Edit Maklumat"><i class="material-icons">settings</i></a>
|
||||||
<a href="{{ route('admin.kakitangan.resetcredentials',['id'=>$staff->id]) }}" class="btn btn-primary" title="Reset Password"><i class="material-icons">restore</i></a>
|
<a href="{{ route('admin.kakitangan.resetcredentials',['id'=>$staff->id]) }}" class="btn btn-primary" title="Reset Password"><i class="material-icons">restore</i></a>
|
||||||
@if(
|
@if(
|
||||||
app()->environment('local')
|
app()->environment(['local', 'staging'])
|
||||||
&&
|
&&
|
||||||
$staff->roles != 'admin'
|
$staff->roles != 'admin'
|
||||||
&& $staff->id != $auth_user->id
|
&& $staff->id != $auth_user->id
|
||||||
|
|||||||
Reference in New Issue
Block a user