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
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.
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 / docker-compose.yml
Last active September 22, 2022 18:55
Nginx web server service.
nginx:
build:
context: ./docker
dockerfile: nginx.dockerfile
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
- USER=${USER:-laravel}
restart: unless-stopped
container_name: nginx
@elvinlari
elvinlari / nginx.dockerfile
Last active September 30, 2022 13:24
Nginx Dockerfile
FROM nginx:stable-alpine
# environment arguments
ARG UID
ARG GID
ARG USER
ENV UID=${UID}
ENV GID=${GID}
ENV USER=${USER}
@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}