-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile.docker
18 lines (14 loc) · 953 Bytes
/
Makefile.docker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.PHONY: docker_prepare _docker_prepare
docker_prepare:
@# XXX: Get a daphne container id deployed by docker-compose.yaml.
@# XXX: `docker exec` will share the environments from original container.
docker exec -it $(shell docker ps -q -f name=codingnightlive_daphne_1) /bin/bash -c "python manage.py migrate"
make docker_resize
docker exec -it $(shell docker ps -q -f name=codingnightlive_daphne_1) /bin/bash -c "python manage.py autodeploy"
docker exec -it $(shell docker ps -q -f name=codingnightlive_daphne_1) /bin/bash -c "python manage.py createsuperuserauto"
docker_resize:
@# XXX: Get a postgres container id deployed by docker-compose.yaml.
@# XXX: `docker exec` will share the environments from original container.
docker exec -it $(shell docker ps -q -f name=codingnightlive_postgres_1) /bin/bash -c '\
psql $$POSTGRES_DB $$POSTGRES_USER -c "ALTER TABLE socialaccount_socialapp ALTER COLUMN name TYPE character varying(65);" \
'