mirror of https://github.com/fspc/workstand.git
Browse Source
* Use default docker-machine IP address * Add lockfile. * Add fixtures * Update readme * Update install instructions.master
Drew Larson
7 years ago
committed by
GitHub
5 changed files with 7728 additions and 43 deletions
@ -1,42 +1,19 @@ |
|||||
## Quickstart |
# Workstand |
||||
Maybe this isn't such a quick start, but it's the best I have right now. After the following steps are completed, you will have a working development version of the Trailer-Safeguard Django application connectable on [bikeshop-dev.local:8000/](http://bikeshop-dev.local:8000/). |
|
||||
|
|
||||
1. Make sure Virtualbox is installed and updated ([https://www.virtualbox.org/](https://www.virtualbox.org/)) |
## Quick start |
||||
2. Make sure Vagrant is installed and updated ([https://www.vagrantup.com/](https://www.vagrantup.com/)) |
|
||||
3. Verify *pip* is installed `which pip` (eg. using [http://brew.sh/](homebrew) `brew install pip`) |
|
||||
4. Verify *ansible* is installed `which ansible` (eg. using [http://brew.sh/](homebrew) `brew install ansible`) |
|
||||
5. 4. Verify *bower* is installed `which ansible` (eg. using [http://brew.sh/](homebrew) `brew install bower`) |
|
||||
5. Clone source `git clone AHHHHHH` |
|
||||
6. cd to root of repo & `bower install` |
|
||||
6. `ansible-galaxy install zenoamaro.postgresql -p provision/roles` |
|
||||
7. `vagrant plugin install vagrant-hostsupdater` |
|
||||
8. `vagrant up` |
|
||||
9. `vagrant ssh` |
|
||||
10. `cd /srv/bikeshop && . /opt/venv/bikeshop-development/bin/activate` |
|
||||
11. `./manage.py migrate` |
|
||||
12. `./manage.py loaddata core/migrations/initial_data.yaml && ./manage.py loaddata authentication/migrations/initial_data.yaml` |
|
||||
13. try to load [http://bikeshop.local/](http://bikeshop.local/) |
|
||||
13. may need to restart supervisor on vagrant machine `service supervisor restart` if receiving 502 |
|
||||
|
|
||||
### Example of dumpdata command |
1. `$ git clone git@github.com:BridgeCityBicycleCoop/workstand.git` |
||||
./manage.py dumpdata --exclude=auth --exclude=contenttypes --exclude=incoming --format=yaml |
2. `$ cd workstand/bikeshop_project` |
||||
|
3. `$ npm install` |
||||
|
4. `$ docker-machine start && eval $(docker-machine env)` |
||||
|
5. `$ cd .. && docker-compose -f docker-compose.yml -f docker-compose.dev.yml build` |
||||
|
6. `$ docker-compose -f docker-compose.yml -f docker-compose.dev.yml run workstand python manage.py migrate` |
||||
|
7. `$ docker-compose -f docker-compose.yml -f docker-compose.dev.yml run workstand python manage.py loaddata fixtures.yaml` |
||||
|
8. `docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d` |
||||
|
9. Visit http://192.168.99.100:8000/ (`docker-machine ls` to see IP address) |
||||
|
10. Login with `u: admin@workstand.dev`and `p: bike!bike!` |
||||
|
|
||||
### Reset the Postgres DB |
**Requirements** |
||||
1. `vagrant ssh` |
|
||||
2. `sudo -i -u postgres` |
|
||||
3. `psql` |
|
||||
4. `\c trailersafeguard_development` |
|
||||
5. ``` |
|
||||
DROP SCHEMA public CASCADE; |
|
||||
CREATE SCHEMA public; |
|
||||
GRANT ALL ON SCHEMA public TO postgres; |
|
||||
GRANT ALL ON SCHEMA public TO public; |
|
||||
COMMENT ON SCHEMA public IS 'standard public schema'; |
|
||||
``` |
|
||||
6. Steps 11 and 12 from **Quickstart**. |
|
||||
|
|
||||
### Starting & Stopping Application |
1. Docker, Docker Compose and Docker Machine |
||||
1. cd to root of repo |
2. Node and NPM |
||||
2. `vagrant up` |
|
||||
3. try to load [http://bikeshop.local/](http://bikeshop.local/) |
|
||||
5. `vagrant halt` |
|
@ -0,0 +1,51 @@ |
|||||
|
- model: registration.customuser |
||||
|
pk: 1 |
||||
|
fields: |
||||
|
password: pbkdf2_sha256$36000$jinrcAwK8S8f$XJ1bBWrm55pertXDA07t5Htv7I1W4tnXSM9FKNYNaAA= |
||||
|
last_login: 2017-08-31 00:31:06.279698+00:00 |
||||
|
is_superuser: true |
||||
|
email: admin@workstand.dev |
||||
|
is_admin: true |
||||
|
is_active: true |
||||
|
groups: [] |
||||
|
user_permissions: [] |
||||
|
- model: registration.member |
||||
|
pk: 1 |
||||
|
fields: {user: null, email: felicia@bikesrgreat.com, email_consent: true, first_name: Felicia, |
||||
|
last_name: Garcia, preferred_name: null, date_of_birth: null, guardian_name: null, |
||||
|
phone: null, street: null, city: null, province: null, country: null, post_code: H0H |
||||
|
0H0, waiver: ! '2017-08-31 00:36:08.645982+00:00', is_active: true, notes: '', |
||||
|
suspended: false, banned: false, created_at: ! '2017-08-31 00:36:08.646610+00:00', |
||||
|
modified_at: ! '2017-08-31 00:36:08.646657+00:00', involvement: '21cd9799b6,c96d389517'} |
||||
|
- model: registration.member |
||||
|
pk: 2 |
||||
|
fields: {user: null, email: floyd.davis@example.com, email_consent: true, first_name: Floyd, |
||||
|
last_name: Davis, preferred_name: null, date_of_birth: null, guardian_name: null, |
||||
|
phone: null, street: null, city: null, province: null, country: null, post_code: H0H |
||||
|
0H0, waiver: ! '2017-08-31 00:37:53.761949+00:00', is_active: true, notes: '', |
||||
|
suspended: true, banned: false, created_at: ! '2017-08-31 00:37:53.764037+00:00', |
||||
|
modified_at: ! '2017-08-31 00:38:00.861245+00:00', involvement: '0ebb0b5468,84309225e7'} |
||||
|
- model: registration.member |
||||
|
pk: 3 |
||||
|
fields: {user: null, email: lovelace.a@example.com, email_consent: true, first_name: Ada, |
||||
|
last_name: Lovelace, preferred_name: null, date_of_birth: null, guardian_name: null, |
||||
|
phone: null, street: null, city: null, province: null, country: null, post_code: H0H |
||||
|
0H0, waiver: ! '2017-08-31 00:39:41.424933+00:00', is_active: true, notes: These |
||||
|
are some notes about Ada., suspended: false, banned: false, created_at: ! '2017-08-31 |
||||
|
00:39:41.426567+00:00', modified_at: ! '2017-08-31 00:40:47.824326+00:00', involvement: 21cd9799b6} |
||||
|
- model: core.membership |
||||
|
pk: 1 |
||||
|
fields: {created_at: ! '2017-08-31 00:36:36.851327+00:00', modified_at: ! '2017-08-31 |
||||
|
00:36:36.866814+00:00', renewed_at: ! '2017-08-31 00:36:16.031457+00:00', self_identification: null, |
||||
|
gender: female, involvement: null, member: 1, payment: 1} |
||||
|
- model: core.membership |
||||
|
pk: 2 |
||||
|
fields: {created_at: ! '2017-08-31 00:40:09.245288+00:00', modified_at: ! '2017-08-31 |
||||
|
00:40:09.280653+00:00', renewed_at: ! '2017-08-31 00:39:54.860759+00:00', self_identification: caucasian, |
||||
|
gender: female, involvement: null, member: 3, payment: 2} |
||||
|
- model: core.payment |
||||
|
pk: 1 |
||||
|
fields: {type: CHEQUE, created_at: ! '2017-08-31 00:36:36.820523+00:00'} |
||||
|
- model: core.payment |
||||
|
pk: 2 |
||||
|
fields: {type: YOUTH, created_at: ! '2017-08-31 00:40:09.148418+00:00'} |
File diff suppressed because it is too large
Loading…
Reference in new issue