You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.0 KiB
58 lines
1.0 KiB
3 years ago
|
# Docker for Lumen API
|
||
|
|
||
|
Langkah-langkah (versi tanpa script):
|
||
|
|
||
|
1. Clone repository
|
||
|
|
||
|
```bash
|
||
|
git clone https://git.oslog.id/juan/simpro-lumen.git
|
||
|
cd simpro-lumen
|
||
|
```
|
||
|
|
||
|
2. Create `.env.production` file. Edit bagian koneksi database
|
||
|
|
||
|
```
|
||
|
B_CONNECTION=pgsql
|
||
|
# Koneksi ke oslogdev
|
||
|
DB_HOST=
|
||
|
DB_PORT=
|
||
|
DB_DATABASE=
|
||
|
DB_USERNAME=
|
||
|
DB_PASSWORD=
|
||
|
```
|
||
|
|
||
|
3. Jalankan script untuk membuat docker container
|
||
|
|
||
|
```bash
|
||
|
# Jika pertama kali dibuild
|
||
|
./kit-app-bullseye.sh build
|
||
|
|
||
|
# Jika containernya sudah ada
|
||
|
./kit-app-bullseye.sh rebuild
|
||
|
```
|
||
|
|
||
|
4. Selesai
|
||
|
|
||
|
|
||
|
Script diatas sebenarnya menjalankan langkah-langkah berikut (biar tidak mengetik secara berulang).
|
||
|
|
||
|
1. Build docker images
|
||
|
|
||
|
```bash
|
||
|
docker build -t ospro/kit_api -f ./docker/Dockerfile .
|
||
|
```
|
||
|
|
||
|
2. Jalankan docker
|
||
|
|
||
|
```bash
|
||
|
docker run -d -p 127.0.0.1:8333:80 --name ospro_kit_api-container ospro/kit_api
|
||
|
```
|
||
|
|
||
|
3. Jika ada update, rebuild
|
||
|
|
||
|
```bash
|
||
|
docker stop ospro_kit_api-container
|
||
|
docker rm ospro_kit_api-container
|
||
|
```
|
||
|
kemudian lakukan langkah `1` dan `2`.
|