forked from carloscosta/apoio-piratas
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from gomex/master
Ultimos ajustes para dockeirizar a aplicação. Patch aceito, thanks!
- Loading branch information
Showing
6 changed files
with
85 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
server { | ||
listen 80; | ||
# server_name 192.168.99.100; | ||
server_name 104.131.25.79; | ||
# ssl_certificate /etc/nginx/cert.crt; | ||
# ssl_certificate_key /etc/nginx/cert.key; | ||
|
||
# ssl_session_cache builtin:1000 shared:SSL:10m; | ||
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | ||
# ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; | ||
# ssl_prefer_server_ciphers on; | ||
|
||
location / { | ||
include uwsgi_params; | ||
uwsgi_pass unix:///app/apoio/apoio.sock; | ||
} | ||
location /media { | ||
alias /app/apoio/inc; | ||
} | ||
location /static { | ||
alias /app/apoio/inc; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
web: | ||
build: . | ||
command: python manage.py runserver 0.0.0.0:8000 | ||
volumes: | ||
- .:/app/ | ||
ports: | ||
- "8000:8000" | ||
version: "2" | ||
services: | ||
web: | ||
build: . | ||
ports: | ||
- "80:80" | ||
logging: | ||
driver: journald | ||
volumes: | ||
- banco_apoio:/app/apoio/db.sqlite3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
Django==1.9.6 | ||
uwsgi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[supervisord] | ||
nodaemon=true | ||
|
||
[program:uwsgi] | ||
user = root | ||
command=uwsgi --socket apoio.sock --chdir /app/apoio --wsgi-file wsgi.py --chmod-socket=666 | ||
autostart=true | ||
autorestart=true | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
|
||
[program:nginx] | ||
user = root | ||
command=/usr/sbin/nginx -g "daemon off;" | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 |