-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker_notes
45 lines (28 loc) · 1.11 KB
/
docker_notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
docker notes
==========
Use Docker Compose to run Rails, Postgis and Redis
===================
First, copy config/application.yml config/secrets.yml and config/database.yml from their non example files
#build everything
docker-compose build
#create the new db and run migrations
docker-compose run web rake db:create db:migrate
#Add super user (Make a note of the password, the email is [email protected])
docker-compose run web rake warper:create_superuser
#or do it the long way around manually
docker exec -it mapwarper_web_1 /bin/bash
bundle exec rake warper:superuser
#Run everything
docker-compose up
connect to localhost:3000 in your browser
Configuration
=========
copy the .env.example file to .env and configure it
----
development
============
docker-compose is set up for production but you can use it in development by passing in the build arg and setting the correct environment variables
docker-compose build --build-arg RAILS_ENV_ARG=development web
and then making sure in your .env file that these are set to development too and changing the database
RAILS_ENV=development
RACK_ENV=development