Skip to content

Instantly share code, notes, and snippets.

View elvinlari's full-sized avatar
🎯
Focusing

Elvin Lari elvinlari

🎯
Focusing
View GitHub Profile
region transfer cost price per GB
US West (Los Angeles) $0.02
US East (N. Virginia) $0.01
Europe (London) $0.02
Storage Pricing price per GB-month
EBS Snapshots Standard $0.05/GB-month
S3 Standard $0.021-$0.023/GB-month
utility containers description
Migrate-Seed Runs migrations and seeders. Should be run just after starting the main containers.
Composer Runs composer commands.
Artisan Runs artisan commands.
Npm Runs npm commands.
@elvinlari
elvinlari / default.conf
Created September 22, 2022 03:14
Nginx custom configuration
server {
listen 8000;
index index.php index.html;
server_name _;
root /var/www/html/public;
error_log stderr warn;
access_log /dev/stdout main;
# error_log /var/log/nginx/error.log;
@elvinlari
elvinlari / docker-compose.yml
Created September 22, 2022 08:07
PHP service
php:
build:
context: ./docker
dockerfile: php.dockerfile
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
- USER=${USER:-laravel}
container_name: php
ports:
@elvinlari
elvinlari / php.dockerfile
Created September 22, 2022 08:28
PHP custom dockerfile.
FROM php:8.1-fpm-alpine
# environment arguments
ARG UID
ARG GID
ARG USER
ENV UID=${UID}
ENV GID=${GID}
ENV USER=${USER}
@elvinlari
elvinlari / docker-compose.yml
Last active September 22, 2022 08:57
Mariadb database service
mysql:
image: mariadb:10.6
container_name: mysql
restart: unless-stopped
tty: true
ports:
- 3307:3306
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
@elvinlari
elvinlari / docker-compose.yml
Created September 22, 2022 15:52
Redis service
redis:
image: redis:alpine
container_name: redis
restart: unless-stopped
ports:
- 6380:6379
networks:
- laravel
@elvinlari
elvinlari / docker-compose.yml
Created September 22, 2022 16:26
Cron job service
laravel-cron:
build:
context: ./docker
dockerfile: php.dockerfile
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
- USER=${USER:-laravel}
container_name: laravel-cron
volumes:
main containers description
NGINX It is the webserver.
PHP Runs PHP-FPM process manager.
Mysql It is the database.
Redis Store cache and sessions.
Cron jobs Runs laravel cron jobs.
Queues Runs laravel queues.
Mailhog Local email testing. It is optional.
phpMyAdmin Database management. It is optional.