You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: replace docker-compose extends with jinja template.
* fix: replace extends with jinja template, in test.yml.
* fix: re-arrange Docker build steps, to reduce delay in hokusai dev start.
* fix: build.yml can be removed now extends is not used.
* fix: update README for hokusai dev
* feat: use host network mode for docker compose services.
* fix: with development.yml using host network mode, mongo/es URL's can be taken from .env. update README accordingly.
* fix: change .env.example ELASTICSEARCH_URL to localhost.
- Set up [Hokusai](https://github.com/artsy/README/blob/master/playbooks/hokusai.md#quickstart)
30
-
-`git clone git@github.com:<your username>/positron.git && cd positron`
31
-
-`COMMIT_HASH=$(git rev-parse --short HEAD) hokusai dev start`
32
-
33
-
This starts a new Docker Compose stack that boots MongoDB, ElasticSearch and Positron. Changes made to source-code are _not_ automatically reloaded. To shut down, press `ctrl+c` or execute `hokusai dev stop`.
- Copy `.env.example` to `.env` in the root of the project and edit all `REPLACE` values with sensitive configuration obtained from `positron-staging`. Use the following command:
In order to write articles, you will need to be a member of a channel. If you are an Artsy dev, you will likely want to point your MONGOHQ_URL to the staging database. Because staging/production databases are protected on our VPC, it is required that you give user permissions to your AWS account and run the [Tunnelblick VPN](https://tunnelblick.net/) while connecting to the database. See details on [setting up a VPN connection here](https://github.com/artsy/infrastructure/blob/master/README.md#vpn).
79
+
### Prepare database
80
+
81
+
#### Using staging database
82
+
83
+
In order to write articles, you will need to be a member of a channel. If you are an Artsy dev, you can point MONGOHQ_URL env to the staging database. Connecting to staging database requires VPN, please see details on [setting up a VPN connection here](https://github.com/artsy/infrastructure/blob/master/README.md#vpn).
84
+
85
+
#### Using a local database
85
86
86
-
If using a local database, use these steps to backfill required data:
87
+
With MongoDB running locally, follow these steps to create a dummy channel:
87
88
88
89
1. Create a collection called `channels` in a `positron` db in your mongo database (You can use the mongo shell or a simple UI like Robomongo.)
If you are using Hokusai dev, start the stack as mentioned in subsequent section, edit the database as mentioned in this step, then restart the stack.
101
+
102
+
103
+
### Start the server
104
+
105
+
#### Using Yarn
100
106
101
107
```
102
108
yarn start
103
109
```
104
110
105
-
- Positron should now be running at [http://localhost:3005/](http://localhost:3005/), open a browser and navigate to it. That will redirect you to staging, login as an Artsy administrator and it will redirect you to `http://localhost:3005` logged into Writer. If you are an Artsy Admin pointed to the staging database, you should see the default partner gallery channel (David Zwirner).
111
+
#### Using Hokusai Dev
106
112
107
-
If you aren't an artsy admin you'll possibly get an Unauthorized page. You need to do one more mongo operation: edit the `users` collection and set your user's `channel_ids` to `[ ObjectId("<your_above_channel_id>") ]`. Once that's done you should be able to see the main writer interface.
113
+
`COMMIT_HASH=$(git rev-parse --short HEAD) hokusai dev start`
114
+
115
+
This starts a new Docker Compose stack that boots MongoDB, ElasticSearch and Positron. Changes made to source-code are _not_ automatically reloaded. To shut down, press `ctrl+c` or execute `hokusai dev stop`.
108
116
109
-
- Run tests
117
+
118
+
Positron should now be running at [http://localhost:3005/](http://localhost:3005/), open a browser and navigate to it. That will redirect you to staging, login as an Artsy administrator and it will redirect you to `http://localhost:3005` logged into Writer.
119
+
120
+
If you are an Artsy Admin, you should see the default partner gallery channel (David Zwirner). If you aren't an artsy admin you'll possibly get an Unauthorized page. You need to do one more mongo operation: edit the `users` collection and set your user's `channel_ids` to `[ ObjectId("<your_above_channel_id>") ]`. Once that's done you should be able to see the main writer interface.
121
+
122
+
## Run tests
123
+
124
+
### Using Yarn
110
125
111
126
```
112
127
yarn test
113
128
```
114
129
115
-
- Make sure you have mongo running in the background or most tests will not work.
130
+
Make sure you have mongo running in the background or most tests will not work.
0 commit comments