forked from DeepMicroscopy/Exact
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Commands.txt
44 lines (28 loc) · 1.69 KB
/
Commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/
Dev:
docker-compose -f docker-compose.yml down -v --remove-orphans
docker-compose -f docker-compose.yml up -d --build
docker-compose logs -f
Prod:
docker-compose -f docker-compose.prod.yml down -v --remove-orphans
docker-compose -f docker-compose.prod.yml up -d --build
docker-compose -f docker-compose.prod.yml exec web python manage.py migrate --noinput
docker-compose -f docker-compose.prod.yml exec web python manage.py createsuperuser
docker-compose -f docker-compose.prod.yml exec web python manage.py collectstatic --no-input --clear
docker-compose -f docker-compose.prod.yml logs -f
docker-compose exec web id
AWS-DB:
Create DB with the same name and credentials on aws rds
docker-compose -f docker-compose.prod.aws-db.yml down -v --remove-orphans
docker-compose -f docker-compose.prod.aws-db.yml up -d --build
docker-compose -f docker-compose.prod.aws-db.yml exec web python manage.py migrate --noinput
docker-compose -f docker-compose.prod.aws-db.yml exec web python manage.py createsuperuser
docker-compose -f docker-compose.prod.aws-db.yml exec web python manage.py collectstatic --no-input --clear
docker-compose -f docker-compose.prod.aws-db.yml logs -f
docker-compose exec web id
Send to ECR
Invoke-Expression -Command (aws ecr get-login --no-include-email)
docker tag exact_nginx:latest 298068947512.dkr.ecr.eu-central-1.amazonaws.com/exact_nginx:latest
docker tag exact_web:latest 298068947512.dkr.ecr.eu-central-1.amazonaws.com/exact:latest
docker tag exact_nginx:latest 298068947512.dkr.ecr.eu-central-1.amazonaws.com/exact_nginx:latest
docker push 298068947512.dkr.ecr.eu-central-1.amazonaws.com/exact:latest