Skip to content

Commit a662246

Browse files
committed
Merge branch 'alternative_configure_docker' of github.com:RubyFloripa/WebsiteOne into alternative_configure_docker
2 parents 3115138 + 9bd2a7e commit a662246

File tree

2 files changed

+45
-6
lines changed

2 files changed

+45
-6
lines changed

docker/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,43 @@
11
# How to use docker to spin up WebSiteOne
22

3+
## Prerequisites
4+
5+
In order to run this container you'll need docker installation
6+
* [Windows](https://docs.docker.com/docker-for-windows/)
7+
* [OS X](https://docs.docker.com/docker-for-mac/)
8+
* [Linux](https://docs.docker.com/linux/started/)
9+
10+
## Setup your environment variables
11+
12+
Create a .env file at the root of your directory.
13+
14+
```
15+
touch .env
16+
```
17+
18+
* You'll have to get the `.env` file content from one of the admins: @tansaku or @diraulo. The project won't work without it. You can send them a direct message (DM) on Slack. The `.env` file should go in the root of the WSO project.
19+
* Add the following to that file:
20+
21+
```
22+
RECAPTCHA_SITE_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
23+
RECAPTCHA_SECRET_KEY=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
24+
AIRBRAKE_API_KEY=blahblahblah
25+
AIRBRAKE_PROJECT_ID=123
26+
SECRET_KEY_BASE=blabla
27+
RACK_TIMEOUT_SERVICE_TIMEOUT=200000000
28+
```
29+
30+
the above are test keys from https://developers.google.com/recaptcha/docs/faq
31+
332
## Setup docker
433

534
Execute this setup just for the first time, or when you want to recreate everything from scratch.
635

736
**BE AWARE IT WILL DELETE ALL YOUR DATA, including the Postgres Database.**
837

38+
39+
40+
941
```
1042
$ ./docker/setup.sh
1143
```

docs/project_setup.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ git fetch upstream
4848
git pull upstream develop
4949
```
5050

51-
### Step 3: Install the gems with `bundle install`
51+
### Step 3: There are two options of setting up, choose one.
52+
53+
## Option 1 - Installation and Usage with Docker
54+
See the [Docker Project Setup](../docker/README.md) documentation
55+
56+
## Option 2 - Local Installation
57+
58+
### Step 1: Install the gems with `bundle install`
5259

5360
bundle install
5461

@@ -80,7 +87,7 @@ If you need to update rails, you can run `bundle update rails`. If you run into
8087
gem install libv8 -v '3.16.14.3' -- --with-system-v8
8188
```
8289

83-
### Step 4: Install javascript dependencies using `npm`
90+
### Step 2: Install javascript dependencies using `npm`
8491
* Use [npm](https://www.npmjs.com/) to install all of the javascript dependencies for WSO:
8592

8693
`npm install`
@@ -92,7 +99,7 @@ If you need to update rails, you can run `bundle update rails`. If you run into
9299
#### Phantomjs
93100
[Phantomjs](http://phantomjs.org/) is used to run tests. [Here are detailed instructions for installing it.](development_environment_set_up.md#phantomjs)
94101

95-
### Step 5: Request the .env file and confirm your locale
102+
### Step 3: Request the .env file and confirm your locale
96103

97104
* You'll have to get the `.env` file from one of the admins: @tansaku or @diraulo. The project won't work without it. You can send them a direct message (DM) on Slack. The `.env` file should go in the root of the WSO project.
98105
* Add the following to that file:
@@ -110,13 +117,13 @@ the above are test keys from https://developers.google.com/recaptcha/docs/faq
110117

111118

112119

113-
### Step 6: Set up the database
120+
### Step 4: Set up the database
114121

115122
* Run the rake command to set up the database. Be sure to use `bundle exec` so that the gems specific to this project (listed in the Gemfile) are used:
116123

117124
`bundle exec rake db:setup`
118125

119-
### Step 7: Run the tests
126+
### Step 5: Run the tests
120127

121128
Now you're ready to run the tests:
122129

@@ -126,7 +133,7 @@ Now you're ready to run the tests:
126133

127134
Discuss any errors with the team on Slack, in a scrum, or in mob or pair programming.
128135

129-
### Step 8. Start the server
136+
### Step 6. Start the server
130137

131138
bundle exec rails s
132139

0 commit comments

Comments
 (0)