Matīss Treinis
4 years ago
No known key found for this signature in database
GPG Key ID: 3781D64D73F1907F
3 changed files with
8 additions and
3 deletions
-
ansible/roles/website/files/nginx.conf.d/almalinux.org.conf
-
docker-compose.production.yml
-
kafe.lua
|
|
@ -1,6 +1,8 @@ |
|
|
|
# DO NOT EDIT - managed by Ansible. |
|
|
|
upstream almalinux_org_backends { |
|
|
|
server 127.0.0.1:9000; |
|
|
|
server 127.0.0.1:9001; |
|
|
|
server 127.0.0.1:9002; |
|
|
|
} |
|
|
|
|
|
|
|
server { |
|
|
|
|
|
@ -11,7 +11,7 @@ services: |
|
|
|
- /var/www/almalinux.org/current/public/static/:/app/static/ |
|
|
|
- .env:/app/.env |
|
|
|
ports: |
|
|
|
- '127.0.0.1:9000:9000' # uWSGI |
|
|
|
- '127.0.0.1:9000-9002:9000' # uWSGI |
|
|
|
|
|
|
|
mariadb: |
|
|
|
image: mariadb:10 |
|
|
|
|
|
@ -35,8 +35,7 @@ k.task('deploy', function() |
|
|
|
k.shell('mv release/{{version}}/public {{public}}/release/{{version}}') |
|
|
|
k.shell('/usr/local/bin/docker-compose up -d mariadb && sleep 5') |
|
|
|
k.shell('/usr/local/bin/docker-compose run web python3 ./manage.py migrate') |
|
|
|
k.shell('/usr/local/bin/docker-compose up -d web') |
|
|
|
k.shell('docker system prune -f') |
|
|
|
k.shell('/usr/local/bin/docker-compose up --no-start --scale web=3 web') |
|
|
|
end |
|
|
|
|
|
|
|
local symlink_www = function() |
|
|
@ -51,6 +50,10 @@ k.task('deploy', function() |
|
|
|
k.shell('/usr/local/bin/docker-compose restart web') |
|
|
|
end |
|
|
|
|
|
|
|
local prune_docker = function() |
|
|
|
k.shell('docker system prune -f') |
|
|
|
end |
|
|
|
|
|
|
|
local remove_old_public_releases = function() |
|
|
|
k.within('{{public}}/release/') |
|
|
|
|
|
|
|