Skip to content

Commit

Permalink
fix: default environment file; update: README.md
Browse files Browse the repository at this point in the history
- fix default environment file for building the app in development
  (miss env variable: DATABASE_URL_FOR_DEVELOPMENT)
- update the README.md
  • Loading branch information
saltchang committed Feb 2, 2021
1 parent 241b9e9 commit 5161543
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 94 deletions.
48 changes: 7 additions & 41 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,19 @@
# 開發日誌
# Changelog

A Flask music app for church.
## Released

本專案為歌曲資料庫網站,提供給 **[Caten-Church](https://caten-church.com)** 使用。
### [0.5.1] - 2020-02-02

- **[Caten Music](https://caten-music.herokuapp.com) - 0.5.0 發佈於 2020-02-22**
- Fix default environment file for building the app in development
(miss env variable: DATABASE_URL_FOR_DEVELOPMENT)

## Tech Stack

- [Python](https://www.python.org/)
- [Pipenv](https://github.com/pypa/pipenv)
- [Flask](http://flask.pocoo.org/)
- [Heroku](https://www.heroku.com/home)
- [PostgreSQL](https://www.postgresql.org/)
- [DropBox API](https://www.dropbox.com/developers/documentation/http/overview)
- [Church Music API (Go & MongoDB)](https://github.com/saltchang/church-music-api)

## Feature

- 檢視詳細歌曲資訊
- 搜尋歌曲(歌名、歌詞)
- 會員註冊、登入、登出
- 依語言類別瀏覽歌曲
- 下載歌曲 PPT、歌譜
- 歌單瀏覽、建立、編輯、刪除、分享
- 歌曲問題回報
- 新增、編輯歌曲
- 三種權限:普通、管理員、總管

## Task

### Doing

- 帳號資料:查看、修改

### Todo

- 刪除歌曲
- 建立歌曲資訊 Model
- 以彈出視窗預覽歌譜
- 修復 Test

## Version
## History

### [0.5.0] - 2020-02-22

#### Added

- 新增 新增歌曲功能
- New feature: create new songs

### [0.4.0] - 2020-01-10

Expand Down
103 changes: 50 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,80 @@
# Caten Music
# [Caten Music](https://music.caten-church.org)

A Flask music app for church.
A music web application for **[Caten Church](https://caten-church.org)**.

本專案為歌曲資料庫網站,提供給 **[Caten-Church](https://caten-church.org)** 使用。
- View and search the songs you need.
- Signing up to create a songlist and share it to your partner.
- Become an admin and create a new song, or edit an old one.

- **[Caten Music](https://caten-music.herokuapp.com) - 0.5.0 發佈於 2020-02-22**
- See **[Changelog](https://github.com/saltchang/caten-music/blob/master/CHANGELOG.md)**
- Also see **[Church Music API](https://github.com/saltchang/church-music-api)**

- **[Changelog 查看日誌](https://github.com/saltchang/caten-music/blob/master/CHANGELOG.md)**
## Stack

## Tech Stack

- [Python](https://www.python.org/)
- [Flask](http://flask.pocoo.org/)
- [Docker](https://www.docker.com/)
- [Python](https://www.python.org)
- [Flask](https://flask.palletsprojects.com)
- [PostgreSQL](https://www.postgresql.org)
- [Docker](https://www.docker.com)
- [Heroku](https://www.heroku.com/home)
- [PostgreSQL](https://www.postgresql.org/)
- [DropBox API](https://www.dropbox.com/developers/documentation/http/overview)
- [Church Music API (Go & MongoDB)](https://github.com/saltchang/church-music-api)

## Released

### [0.5.0] - 2020-02-22
### [0.5.1] - 2021-02-02

- 新增 新增歌曲功能
- Fix default environment file for building the app in development
(miss env variable: DATABASE_URL_FOR_DEVELOPMENT)

## Usage
## Quick Start

### Clone and Set Environment
### Installation

Clone the repository and enter it:
To launch the app locally and quickly, use the sample env file.
Run the command to create a local environment file from default:

```bash
cp env.test .env
```

git clone https://github.com/saltchang/caten-music.git
See [Environment Variables](#environment-variables) for more information.

cd caten-music
```
### Build & Run

To quick use the sample env file,
run the command to rename it for using:
Make sure you have [Docker](https://www.docker.com) installed and then continue.

```bash
1. Build the app with docker-compose:

cp env.test .env
```
```bash
docker-compose build
```

2. Launch the app:

The format of env file must be like following content:
```bash
docker-compose up -d
```

Visit [http://localhost:5000](http://localhost:5000) then you will see the website.

3. See log of the service

- Use the terminal:

```bash
docker-compose logs -f
```

- Or use your docker GUI

### Environment Variables

The format of the `.env` file must be like the following content:

```env
DROPBOX_ACCESS_TOKEN=<Dropbox_API_token>
DATABASE_URL=<DATABASE_URL>
DATABASE_URL_FOR_DEVELOPMENT=<DATABASE_URL_FOR_DEVELOPMENT>
DATABASE_URL_FOR_TESTING = <DATABASE_URL_FOR_TESTING>
APP_SETTING=<Mode:[Production, Development, Testing]>
TEST_SETTING=Testing
Expand All @@ -61,30 +85,3 @@ SECRET_KEY=<Secret_Key>
FLASK_APP=run.py
```

You can change the `<variable>` as your wish.

### Build & Run

Build Docker-Compose

```bash

docker-compose build
```

Run Docker-Compose

```bash

docker-compose up -d
```

Visit [http://localhost:5000](http://localhost:5000) then you will see it.

### See log of the service

```bash

docker-compose logs -f
```
1 change: 1 addition & 0 deletions env.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
DROPBOX_ACCESS_TOKEN=thisIsOnlyForTestNotWork
DATABASE_URL=postgresql://postgres:postgres@db:5432/caten_music
DATABASE_URL_FOR_DEVELOPMENT=postgresql://postgres:postgres@db:5432/caten_music
DATABASE_URL_FOR_TESTING=postgresql://postgres:postgres@db:5432/caten_music
APP_SETTING=Development
TEST_SETTING=Testing
Expand Down

0 comments on commit 5161543

Please sign in to comment.