# Development Tools

# MiniO

# Setup MinIO as AWS S3 alternative in development with docker

#### Installation
1. Make sure your local machine already have Docker installed.

2. Run MinIO:
```
docker run \         
  -p 9000:9000 \
  -p 9001:9001 \
  --name minio-local \
  -v ${HOME}/projects/minio:/data1 \
  -e "MINIO_ROOT_USER=miniouser" \
  -e "MINIO_ROOT_PASSWORD=miniopass" \
  quay.io/minio/minio server /data1 --console-address ":9001"
```
[![](https://yv-knowledgebase.s3.amazonaws.com/uploads/images/gallery/2021-10/scaled-1680-/image-1634006672778.png)](https://yv-knowledgebase.s3.amazonaws.com/uploads/images/gallery/2021-10/image-1634006672778.png)

3. On your Laravel project, install the dependency
```
composer require --with-all-dependencies league/flysystem-aws-s3-v3 "^1.0"
```

4. Change the `.env` on your project
```
AWS_ACCESS_KEY_ID=miniouser
AWS_SECRET_ACCESS_KEY=miniopass
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=testing-saint
AWS_USE_PATH_STYLE_ENDPOINT=false
AWS_ENDPOINT="http://127.0.0.1:9000"
```

5. Running after rebooting your PC / Laptop / Mac (shall I mention rpi too?)
```
docker start minio-local
```

6. Accessing the web interface
Open your web browser, access [`http://localhost:9001`](http://localhost:9001)

7. Creating bucket
[![](https://yv-knowledgebase.s3.amazonaws.com/uploads/images/gallery/2021-10/scaled-1680-/image-1634006535708.png)](https://yv-knowledgebase.s3.amazonaws.com/uploads/images/gallery/2021-10/image-1634006535708.png)

Click 'Create Bucket', and a modal window will be shown like this:
[![](https://yv-knowledgebase.s3.amazonaws.com/uploads/images/gallery/2021-10/scaled-1680-/image-1634006585845.png)](https://yv-knowledgebase.s3.amazonaws.com/uploads/images/gallery/2021-10/image-1634006585845.png)

Set the bucket name. The bucket name will be used as `AWS_BUCKET` in your app.

#### Further Reading
[MinIO Documentation](https://min.io/)

# Expose

# Setup Expose

## [Overview](https://kb.dev.yayasanvitka.id/1.0/tools-expose#overview)

This documentation covers how-to setting up [expose](https://beyondco.de/docs/expose) in Yayasan Vitka development environment.

<a name="prerequisites"></a>

## [Prerequisites](https://kb.dev.yayasanvitka.id/1.0/tools-expose#prerequisites)

You need to set working development server first before using [expose](https://beyondco.de/docs/expose).

## [Installing Expose](https://kb.dev.yayasanvitka.id/1.0/tools-expose#install-expose)

<div id="bkmrk-%24-composer-global-re"><div><div><div>```bash
$ composer global require "beyondcode/expose":"^1.0"
```

</div></div></div></div>## [Configuration](https://kb.dev.yayasanvitka.id/1.0/tools-expose#configuration)

<div id="bkmrk-run%3A-%24-expose-token-">1. Run:
    
    <div>```bash
    $ expose token 00000000-2ee4-4106-91ef-2bc888d66660
    ```
    
    </div>> This token is only a dummy token. Please refer to internal documentation for real key.
2. Publish the configuration
    
    <div>```bash
    $ expose publish
    ```
    
    </div>
3. Edit configuration
    
    <div>```bash
    $ <span class="token function">nano</span> ~/.expose/config.php
    ```
    
    <div><div><a>Copy</a></div></div></div>replace `'host' => 'sharedwithexpose.com'` to `'host' => 'dev.yayasanvitka.id'`

</div>## [Running Expose](https://kb.dev.yayasanvitka.id/1.0/tools-expose#run-expose)

To test if expose is running, go to your web project directory, then run:

<div id="bkmrk-%24-expose-share-https"><div><div><div>```bash
$ expose share https://siakad.test --subdomain<span class="token operator">=</span>siakad
```

<div><div><a>Copy</a></div></div></div></div></div></div>This command shares your local `https://siakad.test` to `https://siakad.dev.yayasanvitka.id`. Visit the url to see if it is working.