Improve docker-compose setup
This commit is contained in:
parent
e695c7cbcf
commit
6cea5924bd
4 changed files with 18 additions and 14 deletions
|
@ -56,9 +56,8 @@ You will likely need to logout and log back in again.
|
||||||
#### Build your docker-container and start it up for initial set up.
|
#### Build your docker-container and start it up for initial set up.
|
||||||
We'll keep this running in the console we'll call **console 1**
|
We'll keep this running in the console we'll call **console 1**
|
||||||
```
|
```
|
||||||
cd docker/debug
|
./dc build
|
||||||
docker-compose build
|
./dc up
|
||||||
docker-compose up
|
|
||||||
```
|
```
|
||||||
#### System configuration
|
#### System configuration
|
||||||
There are a number of steps for configuring your Houdini instance for startup
|
There are a number of steps for configuring your Houdini instance for startup
|
||||||
|
@ -97,7 +96,7 @@ If you need help setting up your mailer, visit `config/environment.rb` where the
|
||||||
##### Switch back to console 1 and run `Ctrl-c` to end the session.
|
##### Switch back to console 1 and run `Ctrl-c` to end the session.
|
||||||
|
|
||||||
##### In console 1, restart the containers
|
##### In console 1, restart the containers
|
||||||
`docker-compose up`
|
`./dc up`
|
||||||
|
|
||||||
##### In console 2, run:
|
##### In console 2, run:
|
||||||
`./run npm run watch`
|
`./run npm run watch`
|
||||||
|
@ -115,7 +114,7 @@ nonprofits, which is located at `/admin` url.
|
||||||
|
|
||||||
To create the super user, go to the rails console by calling:
|
To create the super user, go to the rails console by calling:
|
||||||
|
|
||||||
`docker-compose run web rails console`
|
`./dc run web rails console`
|
||||||
|
|
||||||
In the console, run the following:
|
In the console, run the following:
|
||||||
|
|
||||||
|
|
7
dc
Executable file
7
dc
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
current_commit=$( git rev-parse HEAD )
|
||||||
|
current_branch=$( git rev-parse --abbrev-ref HEAD )
|
||||||
|
|
||||||
|
|
||||||
|
docker-compose -f docker/debug/docker-compose.yml -p "${PWD}_-_-${current_branch}" $@
|
|
@ -11,17 +11,15 @@ COPY script/build/debian/java.sh myapp/script/build/debian/java.sh
|
||||||
RUN myapp/script/build/debian/java.sh
|
RUN myapp/script/build/debian/java.sh
|
||||||
COPY gems /myapp/gems/
|
COPY gems /myapp/gems/
|
||||||
WORKDIR /myapp
|
WORKDIR /myapp
|
||||||
RUN groupadd -r -g 1000 $USER
|
|
||||||
RUN useradd -r -m -g $USER -u 1000 $USER
|
|
||||||
RUN chown -R $USER /usr/local/bundle
|
|
||||||
RUN chgrp -R $USER /usr/local/bundle
|
|
||||||
RUN chown -R $USER /myapp
|
|
||||||
RUN chgrp -R $USER /myapp
|
|
||||||
RUN chown -R $USER /usr/lib/node_modules
|
|
||||||
RUN chgrp -R $USER /usr/lib/node_modules
|
|
||||||
COPY Gemfile /myapp/Gemfile
|
COPY Gemfile /myapp/Gemfile
|
||||||
COPY Gemfile.lock /myapp/Gemfile.lock
|
COPY Gemfile.lock /myapp/Gemfile.lock
|
||||||
RUN bundle install
|
RUN bundle install
|
||||||
|
RUN groupadd -r -g 1000 $USER
|
||||||
|
RUN useradd -r -m -g $USER -u 1000 $USER
|
||||||
|
RUN chown -R $USER /usr/lib/node_modules
|
||||||
|
RUN chgrp -R $USER /usr/lib/node_modules
|
||||||
|
RUN chown -R $USER /myapp
|
||||||
|
RUN chgrp -R $USER /myapp
|
||||||
RUN chown -R $USER /myapp/Gemfile
|
RUN chown -R $USER /myapp/Gemfile
|
||||||
RUN chgrp -R $USER /myapp/Gemfile.lock
|
RUN chgrp -R $USER /myapp/Gemfile.lock
|
||||||
RUN chown -R $USER /usr/local/bundle
|
RUN chown -R $USER /usr/local/bundle
|
||||||
|
|
2
run
2
run
|
@ -1,2 +1,2 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
docker-compose -f docker/debug/docker-compose.yml run web $@
|
./dc run web $@
|
||||||
|
|
Loading…
Reference in a new issue