Skip to content

Instantly share code, notes, and snippets.

View tranphuoctien's full-sized avatar
🎯
Focusing

Tien Tran tranphuoctien

🎯
Focusing
View GitHub Profile
@tranphuoctien
tranphuoctien / rmi_docker
Created October 29, 2018 05:00
Delete docker containers and images
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@tranphuoctien
tranphuoctien / docker-compose.yml
Last active October 31, 2018 02:55
Brazn Deploy docker
version: '3'
services:
# The Application
brazn-php:
image: restaff/brazn-php
working_dir: /var/www
#env_file: ./conf/web/.env
volumes:
- /var/www/storage
environment:
@tranphuoctien
tranphuoctien / prod.app.dockerfile
Created October 31, 2018 04:04
Restaff build app
FROM php:7.2-fpm
LABEL maintainer="[email protected]"
COPY ./brazn-php /var/www
WORKDIR /var/www
# Installing dependencies
@tranphuoctien
tranphuoctien / prod.database.dockerfile
Created October 31, 2018 04:05
Restaff build database
FROM bitnami/mysql:latest
LABEL maintainer="[email protected]"
ADD ./brazn-php/docker-build/init/database/loxley_db.sql /docker-entrypoint-initdb.d
@tranphuoctien
tranphuoctien / prod.web.dockerfile
Created October 31, 2018 04:05
Restaff build web
FROM nginx:1.10-alpine
ADD ./conf/web/prod.vhost.conf /etc/nginx/conf.d/default.conf
COPY ./brazn-php/public /var/www/public
#!/bin/bash
shopt -s extglob
#echo -n "Username: ";
#read username;
#echo -n "Password: ";
#Disabling echo, so that password will not be visible on screen
#read -s password
#Enabling echo
echo "";
echo -n "Location deploy in: ";
@tranphuoctien
tranphuoctien / vhost.conf
Created October 31, 2018 06:49
Restaff brazn vhost
server {
listen 80;
index index.php index.html;
root /var/www/public;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location / {
try_files $uri /index.php?$args;
}
@tranphuoctien
tranphuoctien / .env
Last active October 31, 2018 08:11
Restaff brazn .env
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:ri2u3+89sE6+NYJcfNRJ1D9go2UktHyhFt9kDrdKvaQ=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=brazn-mysql
@tranphuoctien
tranphuoctien / dev.docker-compose.yml
Created October 31, 2018 06:58
Restaff brazn test docker compose
version: '3'
services:
# Brazn PHP
brazn-php:
build:
context: .
dockerfile: prod.app.dockerfile
image: restaff/brazn-php-dev
restart: always
@tranphuoctien
tranphuoctien / linux_dev_init
Created October 31, 2018 07:02
Restaff setup dev docker compose
#!/bin/bash
shopt -s extglob
echo -n "Username: ";
read username;
#echo -n "Password: ";
#Disabling echo, so that password will not be visible on screen
#read -s password
#Enabling echo
echo "";
echo -n "Location deploy in: ";