Skip to content

Commit

Permalink
Merge pull request #5 from helsenorgelab/docs/update-readme
Browse files Browse the repository at this point in the history
Docs/update readme
  • Loading branch information
losviko authored Mar 12, 2019
2 parents 57c1159 + 8306557 commit 6646c2a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 30 deletions.
29 changes: 10 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
norwegian_ehealth Wagtail site
helsenorgelab.no website
==================

## Contributing
Expand All @@ -9,20 +9,15 @@ norwegian_ehealth Wagtail site
1. Edit details as necessary.


~~Gitlab has built-in CI tests. These can be configured by editing `.gitlab-ci.yml`. By default these are run on all pushes and merge requests.~~


If you need to preview work on `staging`, this can be merged and deployed manually without making a merge request. You can still make the merge request as above, but add a note to say that this is on `staging`, and not yet ready to be merged to `master`.

# Setting up a local build

This repository includes a Vagrantfile for running the project in a Debian VM and
a fabfile for running common commands with Fabric.
This repository includes a Vagrantfile for running the project in a Debian VM and a fabfile for running common commands with Fabric.
Make sure [Vagrant](https://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads) are installed

To set up a new build:

``` bash
git clone [URL TO GIT REMOTE]
git clone https://github.com/helsenorgelab/helsenorgelab.no.git
cd helsenorgelab.no
vagrant up
vagrant ssh
Expand All @@ -41,7 +36,7 @@ This will make the site available on the host machine at: http://127.0.0.1:8000/

# Front-end assets

To build front-end assets you will additionally need to run the following commands:
To build front-end assets you will additionally need to run the following commands in the `norwegian_ehalth/static_src folder`:

```bash
npm install
Expand Down Expand Up @@ -70,19 +65,15 @@ to be able to connect to it.

## Pulling data

To populate your local database with the content of staging/production:
To populate your local database with the content from production:

``` bash
fab pull-dev-data
fab pull-staging-data
fab pull-production-data
```

Additionally, to fetch images and other media.

``` bash
fab pull-dev-media
fab pull-staging-media
fab pull-production-media
```

Expand All @@ -94,7 +85,6 @@ To deploy the site to dev/staging/production:


``` bash
fab deploy-dev
fab deploy-staging
fab deploy-production
```
Expand All @@ -104,7 +94,6 @@ fab deploy-production
To open the shell of the servers.

```bash
fab dev-shell
fab staging-shell
fab production-shell
```
Expand All @@ -117,15 +106,13 @@ sure to take backups.
If you want to push your local database to the servers.

```bash
fab push-dev-data
fab push-staging-data
fab push-production-data
```

Or if you want to push your local media files.

```bash
fab push-dev-media
fab push-staging-media
fab push-production-media
```
Expand All @@ -138,3 +125,7 @@ When you set up a server you should make sure the following scheduled tasks are
* `django-admin publish_scheduled_pages` - every 10 minutes or more often. This is necessary to make publishing scheduled pages work.
* `django-admin clearsessions` - once a day (not necessary, but useful).
* `django-admin update_index` - once a day (not necessary, but useful to make sure search index stays intact).


## To do
[ ] Configure CI tests? Checkk sample config in .gitlab-ci.yml
41 changes: 30 additions & 11 deletions norwegian_ehealth/static_src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6646c2a

Please sign in to comment.