-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide attributes for git config (#434)
* Provide attributes for git config * Add git config data and development usage * Fix installation section * Fix typo * Remove database condition * Add author and email to shard.yml * Fix wrong var name * Avoid empty `user.name` or `user.email` * Use system * Add type * Mention amber encrypt and add mysql * Remove variable * Fix default * Clarify fetch code
- Loading branch information
1 parent
7aa7800
commit 9cdc372
Showing
3 changed files
with
85 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,87 @@ | ||
# <%= @name %> | ||
|
||
Your description here | ||
A new project using [Amber Framework](https://amberframework.org/) | ||
|
||
## Installation | ||
|
||
Install back-end and front-end dependencies. | ||
|
||
``` | ||
shards install | ||
npm install | ||
``` | ||
|
||
Configure the `config/environments/development.yml` and set the `database_url` with your credentials to your database. | ||
|
||
Then: | ||
|
||
```shellsession | ||
shards update | ||
``` | ||
amber db create migrate | ||
``` | ||
|
||
## Usage | ||
|
||
To run the demo: | ||
### Development | ||
|
||
To build crystal files: | ||
|
||
``` | ||
amber watch | ||
``` | ||
|
||
To build assets: | ||
|
||
``` | ||
npm run watch | ||
``` | ||
|
||
### Production | ||
|
||
To setup `AMBER_ENV`: | ||
|
||
```shellsession | ||
$ shards build src/<%= @name %>.cr | ||
./<%= @name %> | ||
``` | ||
export AMBER_ENV=production | ||
``` | ||
|
||
To build a production release: | ||
|
||
``` | ||
shards build --production --release <%= @name %> | ||
``` | ||
|
||
To build production assets: | ||
|
||
``` | ||
npm run release | ||
``` | ||
|
||
To use encrypted enviroment settings see [documentation](https://github.com/amberframework/online-docs/blob/master/getting-started/cli/encrypt.md#encrypt-command) | ||
|
||
## Docker Compose | ||
|
||
This will start an instance of postgres, migrate the database, | ||
This will start an instance of <%= @database == "pg" ? "postgres" : "mysql" %>, migrate the database, | ||
and launch the site at http://localhost:3000 | ||
|
||
```shellsession | ||
``` | ||
docker-compose up -d | ||
``` | ||
|
||
To view the logs: | ||
|
||
```shellsession | ||
``` | ||
docker-compose logs -f | ||
``` | ||
|
||
Note: The Docker images are compatible with Heroku. | ||
> Note: The Docker images are compatible with Heroku. | ||
|
||
## Contributing | ||
|
||
1. Fork it ( https://github.com/[your-github-name]/your_project/fork ) | ||
1. Fork it ( https://github.com/<%= @github_name %>/<%= @name %>/fork ) | ||
2. Create your feature branch (git checkout -b my-new-feature) | ||
3. Commit your changes (git commit -am 'Add some feature') | ||
4. Push to the branch (git push origin my-new-feature) | ||
5. Create a new Pull Request | ||
|
||
## Contributors | ||
|
||
- [your_github_name](https://github.com/your_github_name) your_name - creator, maintainer | ||
- [<%= @github_name %>](https://github.com/<%= @github_name %>) <%= @author %> - creator, maintainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters