Skip to content

Commit

Permalink
Merge pull request #61 from ikhsan3adi/refactor/env
Browse files Browse the repository at this point in the history
fix: Replace .env with .env.example
  • Loading branch information
ikhsan3adi authored Apr 23, 2024
2 parents 8be4920 + 27538ea commit 132dc87
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .env → .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# ENVIRONMENT
#--------------------------------------------------------------------

; CI_ENVIRONMENT = production
CI_ENVIRONMENT = development
# CI_ENVIRONMENT = development
CI_ENVIRONMENT = production

#--------------------------------------------------------------------
# APP
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
restore-keys: |
${{ runner.os }}-php-
- name: Setup environment
run: cp .env.example .env

- name: Install dependencies
run: composer install --prefer-dist --no-progress

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ $RECYCLE.BIN/
#-------------------------
# These should never be under version control,
# as it poses a security risk.
# .env
.env
.vagrant
Vagrantfile

Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ Aplikasi Web Sistem Absensi Sekolah Berbasis QR Code adalah sebuah proyek yang b
### Instalasi

- Unduh dan impor kode proyek ini ke dalam direktori proyek anda (htdocs).
- Jika belum memiliki file `.env`, rename file `.env.example` menjadi `.env` atau jalankan perintah berikut:

```shell
# linux & macos, git bash
composer run-script setup-env
# windows cmd/powershell
composer run-script setup-env-win
```

- (Opsional) Konfigurasi file `.env` untuk mengatur parameter seperti koneksi database dan pengaturan lainnya sesuai dengan lingkungan pengembangan Anda.
- (Opsional) Ganti/replace logo sekolah di `public/assets/img/logo_sekolah.jpg`.
- (Opsional) Konfigurasi file `app/Config/App.php` untuk mengubah base url sesuai dengan nama folder project.
Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@
}
},
"scripts": {
"test": "phpunit"
"test": "phpunit",
"setup-env": "cp .env.example .env",
"setup-env-win": "copy .env.example .env"
},
"support": {
"forum": "https://forum.codeigniter.com/",
"source": "https://github.com/codeigniter4/CodeIgniter4",
"slack": "https://codeigniterchat.slack.com"
}
}
}

0 comments on commit 132dc87

Please sign in to comment.