houdini/docs/docker.md

100 lines
2.7 KiB
Markdown
Raw Normal View History

2020-10-15 19:15:34 +00:00
# Using docker (outdated)
## Docker install (if you don't have docker and docker-compose installed)
### install Docker and Docker compose
2020-05-27 22:31:36 +00:00
You need to install Docker and Docker Compose.
2020-10-15 19:15:34 +00:00
* *Note:* Docker and Docker Compose binaries from Docker itself are proprietary
software based entirely upon free software. If you feel more comfortable,
you may build them from source.
* *Note 2:* For Debian, the Docker package is simply too out of date to be usable.
2020-05-27 22:31:36 +00:00
Even the version for latest Ubuntu LTS is too old. For reliability, we strongly
2020-10-15 19:15:34 +00:00
recommend using the Docker debian feed from docker itself OR making sure you
keep your own build up to date.
### Add yourself to the docker group
2020-05-27 22:31:36 +00:00
Adding yourself as a Docker group user as follows:
`sudo usermod -aG docker $USER`
You will likely need to logout and log back in again.
2020-10-15 19:15:34 +00:00
## Build your docker-container and start it up for initial set up
2020-05-27 22:31:36 +00:00
We'll keep this running in the console we'll call **console 1**
2020-10-15 19:15:34 +00:00
```ruby
2020-05-27 22:31:36 +00:00
./dc build
./dc up
```
2020-10-15 19:15:34 +00:00
## System configuration
2020-05-27 22:31:36 +00:00
There are a number of steps for configuring your Houdini instance for startup
2020-10-15 19:15:34 +00:00
### Start a new console we'll call **console 2**
### In console 2, copy the env template to your .env file
```shell
2020-05-27 22:31:36 +00:00
cp .env.template .env
```
2020-10-15 19:15:34 +00:00
### In console 2, run the following fill your `DEVISE_SECRET_KEY`
`./run rake secret ## copy this result into your DEVISE_SECRET_KEY`
Now copy the output to you .env file to set you `DEVISE_SECRET_KEY` environment variable
### In console 2, run the following to fill your `SECRET_TOKEN`
```ruby
./run rake secret ## copy this result into your SECRET_TOKEN
2020-05-27 22:31:36 +00:00
```
2020-10-15 19:15:34 +00:00
Now copy the output to you .env file to set you `SECRET_TOKEN` environment variable
### Set the following secrets in your .env file with your Stripe account information
* `STRIPE_API_KEY` with your Stripe PRIVATE key
* `STRIPE_API_PUBLIC` with your Stripe PUBLIC key
### You SHOULD set your AMAZON s3 information (optional but STRONGLY recommended)
2020-05-27 22:31:36 +00:00
If you don't, file uploads WILL NOT WORK but it's not required.
2020-10-15 19:15:34 +00:00
### In console 2, install yarn
2020-05-27 22:31:36 +00:00
`./run yarn`
2020-10-15 19:15:34 +00:00
### In console 2, fill the db
2021-02-09 19:26:13 +00:00
`./run rake db:create db:schema:load db:seed test:prepare`
2020-10-15 19:15:34 +00:00
### Set up mailer info
2020-05-27 22:31:36 +00:00
2020-10-15 19:15:34 +00:00
You can set this in `config/default_organization.yml` or better yet, make
a copy with your own org name and add that to your .env file as `ORG_NAME`
If you need help setting up your mailer, visit `config/environment.rb` where
the settings schema is verified and documented.
2020-05-27 22:31:36 +00:00
2020-10-15 19:15:34 +00:00
## Startup
### Switch back to console 1 and run `Ctrl-c` to end the session
### In console 1, restart the containers
2020-05-27 22:31:36 +00:00
`./dc up`
2020-10-15 19:15:34 +00:00
### In console 2, run
2020-05-27 22:31:36 +00:00
`./run yarn watch`
2020-10-15 19:15:34 +00:00
### You can go to <http://localhost:5000>
2020-05-27 22:31:36 +00:00
2020-10-15 19:15:34 +00:00
To get started, register your nonprofit using the "Get Started" link.