Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Commit cc0562c

Browse files
committed
removed duplicated migration file, fixed docker-compose.ci.yml file
1 parent c0b9a42 commit cc0562c

File tree

3 files changed

+32
-24
lines changed

3 files changed

+32
-24
lines changed

backend/apps/accounts/migrations/0002_auto_20201124_0323.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

docker-compose.ci.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,31 @@ version: '3.7'
22

33
services:
44

5+
services:
56
postgres:
67
container_name: postgres
7-
image: postgres
8+
image: postgres:11.5
89
networks:
910
- main
11+
ports:
12+
- "5434:5432"
1013
volumes:
1114
- pg-data:/var/lib/postgresql/data
15+
environment:
16+
- POSTGRES_PASSWORD=postgres123
1217

1318
backend: &backend
1419
container_name: backend
1520
build:
1621
context: ./backend
1722
dockerfile: scripts/prod/Dockerfile
18-
command: /start_ci.sh
23+
command: >
24+
bash -c "
25+
python3 manage.py makemigrations
26+
python3 manage.py migrate --no-input
27+
python3 manage.py create_default_user
28+
gunicorn -t 300 -b 0.0.0.0:8000 backend.wsgi
29+
"
1930
networks:
2031
- main
2132
volumes:
@@ -27,11 +38,18 @@ services:
2738
- SECRET_KEY='secret'
2839
- DEBUG=True
2940
- DJANGO_SETTINGS_MODULE=backend.settings.gitlab-ci
41+
- POSTGRES_PASSWORD=postgres123
3042

3143
asgiserver:
3244
<<: *backend
3345
container_name: asgiserver
34-
entrypoint: /start_asgi.sh
46+
command:
47+
- "daphne"
48+
- "backend.asgi:application"
49+
- "--bind"
50+
- "0.0.0.0"
51+
- "--port"
52+
- "9000"
3553
volumes:
3654
- ./backend:/code
3755

docker-compose.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,17 @@ services:
8181
build:
8282
context: ./backend
8383
dockerfile: scripts/dev/Dockerfile
84-
command: /start_dev.sh
84+
command:
85+
- "watchmedo"
86+
- "auto-restart"
87+
- "--directory=./"
88+
- "--pattern=*.py"
89+
- "--recursive"
90+
- "--"
91+
- "python3"
92+
- "manage.py"
93+
- "runserver_plus"
94+
- "0.0.0.0:8000"
8595
volumes:
8696
- ./backend:/code
8797
- django-static:/code/static

0 commit comments

Comments
 (0)