Commit 444b9049 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

unicorn + nginx integration

parent 47190bb6
......@@ -238,13 +238,31 @@ Hosts a mysql server listening on port 3306 with two databases: `allgo` and
## rails
Hosts three daemons for running allgo:
Hosts four daemons for running allgo:
- the rails server
- the unicorn server (runnning the rails application)
- the sidekiq queue manager
- the redis db server
- a nginx frontend for buffering the HTTP requests/responses
This container is managed with supervisor, the `supervisorctl` command allows
starting/stopping the daemons individually.
### Running the rails server manually
- run the `dev-rails` container and open a shell:
<pre>
fig up -d
docker exec -t -i dev-rails bash
</pre>
- then, inside the container, run:
<pre>
supervisorctl stop rails
rails server
</pre>
(TODO add unicorn+nginx for production)
## ssh
......
......@@ -63,7 +63,7 @@ dev-rails:
user: "$DOCKER_USER"
ports:
- "127.0.0.1:3000:3000"
- "127.0.0.1:3000:8080"
volumes:
- "/data/dev/rails:/vol"
......
......@@ -47,7 +47,7 @@ EOF
# write nginx config
write_config <<EOF
ALLGO($CTR, 3000, $FQDN, 443)
ALLGO($CTR, 8080, $FQDN, 443)
{
# here you can add nginx directives for the server configuration
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment