-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from springload/feature/update-readme
Update setup instructions
- Loading branch information
Showing
8 changed files
with
58 additions
and
50 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
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 |
---|---|---|
|
@@ -33,6 +33,7 @@ media/* | |
.coverage | ||
.bundle | ||
dev.env | ||
temp/ | ||
|
||
docker/database/*.sql | ||
|
||
|
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 |
---|---|---|
|
@@ -5,77 +5,88 @@ | |
*Check out [Awesome Wagtail](https://github.com/springload/awesome-wagtail) for more awesome packages and resources from the Wagtail community.* | ||
|
||
## Installation | ||
## Back End Setup | ||
|
||
Install [Vagrant](http://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads), then from the command-line: | ||
Development on this project can be done using docker. If you have not yet | ||
installed docker, consult the instructions for your operating system. | ||
|
||
[Docker](https://docs.docker.com/) | ||
|
||
It's a good idea to set up the nginx proxy if you have not done so already, | ||
instructions can be found on the github repo. | ||
|
||
Vagrant is no longer in this project, and any material relating to vagrant | ||
can be ignored. | ||
|
||
## Clone the repo | ||
|
||
```sh | ||
cd [my-dev-environment] | ||
git clone [email protected]:springload/madewithwagtail.git | ||
cd madewithwagtail | ||
.githooks/deploy | ||
vagrant up | ||
# [.. wait until everything gets installed] | ||
vagrant ssh | ||
# [.. from your vagrant machine] | ||
djrun | ||
``` | ||
### Setup your environment variables | ||
|
||
The demo site will now be accessible at [http://localhost:8111/](http://localhost:8111/) and the Wagtail admin interface at [http://localhost:8111/admin/](http://localhost:8111/admin/) . Log into the admin with the credentials ``admin / changeme``. | ||
```sh | ||
cp dev.env.example dev.env | ||
``` | ||
|
||
### Front-end installation | ||
And then edit `dev.env` to suit your local setup. Any API keys etc should be in Bitwarden. | ||
|
||
> Install [Node](https://nodejs.org). This project also uses [nvm](https://github.com/creationix/nvm). | ||
### Database setup | ||
|
||
To install our dependencies: | ||
First, download the database dump you want from our [Google Cloud storage](<https://console.cloud.google.com/storage/browser/springload-backups/madewithwagtail?pageState=(%22StorageObjectListTable%22:(%22f%22:%22%255B%255D%22))&project=springload-backups&prefix=&forceOnObjectsSortingFiltering=false>). | ||
|
||
```sh | ||
nvm install | ||
# Then, install all project dependencies. | ||
npm install | ||
``` | ||
|
||
## Working on the project | ||
Next decrypt the dump using gpg. | ||
|
||
> Everything mentioned in the installation process should already be done. | ||
Finally, place the decrypted .sql file into [my-dev-environment]/madewithwagtail/docker/database - it will be automatically loaded when you build your database container in the next section. | ||
|
||
### Starting the server | ||
### Build your containers | ||
|
||
```sh | ||
vagrant up | ||
vagrant ssh | ||
djrun | ||
docker-compose up | ||
# In another terminal tab run: | ||
docker-compose exec application ./manage.py migrate | ||
``` | ||
|
||
### Front-end commands | ||
### Browsing locally | ||
|
||
**https://madewithwagtail.dev.springload.nz/** | ||
|
||
## Front End | ||
|
||
This project uses [nvm](https://github.com/creationix/nvm) and [Yarn](https://yarnpkg.com/lang/en/) | ||
|
||
```sh | ||
# Make sure you use the right node version. | ||
nvm use | ||
|
||
# Setup | ||
yarn install | ||
|
||
# Start the server and the development tools. | ||
npm run start | ||
yarn run start | ||
|
||
# Builds frontend assets. | ||
npm run build | ||
# Runs linting. | ||
npm run lint:versions | ||
# Runs tests. | ||
npm run test | ||
# View other available commands with: | ||
npm run | ||
``` | ||
yarn run build | ||
|
||
## Deploying a new version | ||
# Builds frontend production assets. | ||
yarn run dist | ||
|
||
### To production | ||
# Runs linting. | ||
yarn run lint | ||
|
||
```sh | ||
npm run deploy | ||
``` | ||
# Runs tests. | ||
yarn run test | ||
|
||
From your local machine, it's a good idea to push to the master before | ||
pushing to the deploy branch. That way you know that both are up to date. | ||
# View other available commands with: | ||
yarn run | ||
``` | ||
|
||
## Documentation | ||
|
||
Check out the [`docs/`](docs/) in their own folder. | ||
|
||
### Browser support | ||
|
||
**Supported browser / device versions:** | ||
|
@@ -85,7 +96,7 @@ pushing to the deploy branch. That way you know that both are up to date. | |
| Mobile Safari | iOS Phone | latest | | ||
| Mobile Safari | iOS Tablet | latest | | ||
| Chrome | Android | latest | | ||
| IE | Desktop | 11 | | ||
| Edge | Desktop | latest | | ||
| Chrome | Desktop | latest | | ||
| Firefox | Desktop | latest | | ||
| Safari | OSX | latest | | ||
|
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
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