Skip to content

Instantly share code, notes, and snippets.

@arifnd
arifnd / Dockerfile
Created August 12, 2025 15:09
Customized FrankenPHP Docker Image for CodeIgniter 4
FROM dunglas/frankenphp:alpine
# Enable PHP production settings
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# add additional extensions here:
RUN install-php-extensions \
@composer \
gd \
intl \
@arifnd
arifnd / compose.yaml
Last active August 14, 2025 19:36
Docker compose file for redis ssl
version: '3.8'
services:
redis:
image: bitnami/redis:7.4
ports:
- "0.0.0.0:6379:6379"
env_file: .env
environment:
- REDIS_TLS_ENABLED=yes
@arifnd
arifnd / Dockerfile
Created August 9, 2025 04:29
Example Dockerfile for run Laravel using serversideup/php Docker images
FROM serversideup/php:8.4-fpm-nginx-alpine
WORKDIR /var/www/html
COPY . .
USER root
RUN composer install --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader \
&& php artisan optimize \ # Can remove when set AUTORUN_ENABLED=true
@arifnd
arifnd / .env
Created July 22, 2025 03:27
n8n compose file without caddy
# DOMAIN_NAME and SUBDOMAIN together determine where n8n will be reachable from
# The top level domain to serve from
DOMAIN_NAME=
# The subdomain to serve from
SUBDOMAIN=n8n
# The above example serve n8n at: https://n8n.example.com
# Optional timezone to set which gets used by Cron and other scheduling nodes
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
server_name domain.com;
server_tokens off;
@arifnd
arifnd / compose.yaml
Created December 17, 2024 09:19
Docker compose for deploy Laravel with FrankenPHP
services:
php:
# uncomment the following line to use a version of PHP that supports your application
image: dunglas/frankenphp #php8.4
# image: dunglas/frankenphp:php8.3
# image: dunglas/frankenphp:php8.2
# uncomment the following line if you want to use a custom Dockerfile
#build: .
# uncomment the following line if you want to run this in a production environment
# restart: always
# To learn more about how to use Nix to configure your environment
# see: https://developers.google.com/idx/guides/customize-idx-env
{ pkgs, ... }: {
# Which nixpkgs channel to use.
channel = "stable-23.11"; # or "unstable"
# Use https://search.nixos.org/packages to find packages
packages = [
pkgs.php82
pkgs.php82Packages.composer
# pkgs.go
@arifnd
arifnd / laravel.nix
Last active January 2, 2025 14:36
Project idx nix file for Laravel
# To learn more about how to use Nix to configure your environment
# see: https://developers.google.com/idx/guides/customize-idx-env
{pkgs}: {
# Which nixpkgs channel to use.
channel = "stable-24.11"; # or "unstable"
# Use https://search.nixos.org/packages to find packages
packages = [
pkgs.php82
pkgs.php82Packages.composer
pkgs.nodejs_20
@echo off
set TOKEN=YOUR_TOKEN
set NPSN=YOUR_NPSN
curl -X GET ^
-H "Authorization: Bearer %TOKEN%" ^
"http://localhost:5774/WebService/getSekolah?npsn=%NPSN%" > data-sekolah.txt
curl -X GET ^
@arifnd
arifnd / cache
Created March 4, 2024 05:42
Laravel 11 maintenance down
illuminate:foundation:down|a:7:{s:6:"except";a:0:{}s:8:"redirect";N;s:5:"retry";N;s:7:"refresh";N;s:6:"secret";N;s:6:"status";i:503;s:8:"template";N;}|2024890720