mirror of
https://github.com/Crocmagnon/cookiecutter-django.git
synced 2024-11-13 02:13:53 +01:00
Add some server scripts
This commit is contained in:
parent
79a670f666
commit
31fa3d44c5
2 changed files with 28 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
|||
version: '2.4'
|
||||
services:
|
||||
django:
|
||||
image: crocmagnon/{{cookiecutter.project_slug}}
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./db:/app/db
|
||||
- ./data:/app/data
|
||||
networks:
|
||||
- frontend
|
||||
user: 1000:1000
|
||||
restart: always
|
||||
init: true
|
||||
tty: true
|
||||
mem_limit: 512m
|
||||
|
||||
networks:
|
||||
frontend:
|
||||
external: true
|
8
{{cookiecutter.project_slug}}/contrib/server/update
Normal file
8
{{cookiecutter.project_slug}}/contrib/server/update
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
pushd /mnt/data/{{cookiecutter.project_slug}}
|
||||
docker compose --ansi never pull --quiet
|
||||
docker compose --ansi never up -d
|
||||
docker compose exec django python manage.py migrate
|
||||
popd
|
||||
docker image prune -f
|
Loading…
Reference in a new issue