This repository was archived by the owner on Mar 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 12 files changed +50
-108
lines changed
apps/core/management/commands Expand file tree Collapse file tree 12 files changed +50
-108
lines changed Original file line number Diff line number Diff line change 1
1
SECRET_KEY=secret
2
2
DEBUG=True
3
3
4
- POSTGRES_NAME=postgres
5
- POSTGRES_USERNAME=postgres
6
- POSTGRES_PASSWORD=postgres
7
- POSTGRES_SERVICE_HOST=postgres
8
- POSTGRES_SERVICE_PORT=5432
9
-
10
-
11
4
# social auth
12
5
GITHUB_KEY=yourkey
13
6
GITHUB_SECRET=yoursecret
@@ -18,9 +11,6 @@ GOOGLE_OAUTH2_SECRET=abcde-fghij
18
11
SOCIAL_AUTH_FACEBOOK_KEY = ''
19
12
SOCIAL_AUTH_FACEBOOK_SECRET = ''
20
13
21
- CELERY_BROKER_URL=redis://redis:6379/0
22
- CELERY_RESULT_BACKEND=redis://redis:6379/1
23
-
24
14
DJANGO_EMAIL_HOST=mailhog
25
15
DJANGO_EMAIL_PORT=1025
26
16
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ media
2
+ static
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 15
15
from kombu import Queue
16
16
import redis
17
17
18
- # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
19
- BASE_DIR = os .path .dirname (
20
- os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
21
- )
22
-
18
+ # Build paths inside the project like this: BASE_DIR / 'subdir'.
19
+ BASE_DIR = Path (__file__ ).resolve (strict = True ).parent .parent .parent
23
20
24
21
# Quick-start development settings - unsuitable for production
25
22
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
269
266
# Assets
270
267
271
268
STATIC_URL = "/static/"
272
- STATIC_ROOT = "/static/"
269
+ STATIC_ROOT = os . path . join ( BASE_DIR , "media" )
273
270
274
271
MEDIA_URL = "/media/"
275
272
MEDIA_ROOT = os .path .join (BASE_DIR , "media" )
Original file line number Diff line number Diff line change @@ -3,4 +3,8 @@ django-extensions==2.2.9 # NOTE: in installed_apps
3
3
Werkzeug==1.0.1 # used for runserver_plus exception console
4
4
ipython==7.14.0
5
5
jupyter==1.0.0
6
- gql==2.0.0
6
+ gql==2.0.0
7
+
8
+ watchdog==0.10.3
9
+ pyyaml==5.3.1
10
+ argh==0.26.2
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ services:
40
40
nginx :
41
41
container_name : nginx
42
42
build :
43
- context : .
44
- dockerfile : nginx/ dev/Dockerfile
43
+ context : ./nginx
44
+ dockerfile : dev/Dockerfile
45
45
ports :
46
46
- " 80:80"
47
47
depends_on :
@@ -129,18 +129,42 @@ services:
129
129
celery :
130
130
<< : *backend
131
131
container_name : celery
132
- command : bash -c 'python3 manage.py watch_celery --queue default --concurrency=2'
133
- volumes :
134
- - ./backend:/code
132
+ command :
133
+ - " watchmedo"
134
+ - " auto-restart"
135
+ - " --directory=./"
136
+ - " --pattern=*.py"
137
+ - " --recursive"
138
+ - " --"
139
+ - " celery"
140
+ - " worker"
141
+ - " --app=backend.celery_app:app"
142
+ - " -Q"
143
+ - " default"
144
+ - " --concurrency=1"
145
+ - " --loglevel=INFO"
135
146
ports : []
136
147
137
148
beat :
138
149
<< : *backend
139
- build :
140
- context : ./backend
141
- dockerfile : scripts/dev/Dockerfile
142
150
container_name : beat
143
- command : /start_beat.sh
151
+ command :
152
+ - " sh"
153
+ - " -c"
154
+ - |
155
+ # remove celerybeat.pid and celerybeat-schedule if they exist
156
+ rm -f /code/celerybeat*;
157
+ watchmedo \
158
+ auto-restart \
159
+ --directory=./ \
160
+ --pattern=*.py \
161
+ --recursive \
162
+ -- \
163
+ celery \
164
+ beat \
165
+ --app=backend.celery_app:app \
166
+ --loglevel=INFO \
167
+ --pidfile=/code/celerybeat.pid
144
168
volumes :
145
169
- ./backend:/code
146
170
ports : []
@@ -150,7 +174,7 @@ services:
150
174
container_name : flower
151
175
command : --url_prefix=flower --inspect_timeout=20000
152
176
environment :
153
- - CELERY_BROKER_URL=${CELERY_BROKER_URL}
177
+ - CELERY_BROKER_URL=redis://redis:6379/0
154
178
- FLOWER_PORT=5555
155
179
ports :
156
180
- 5555:5555
Original file line number Diff line number Diff line change 1
1
FROM nginx:1.18.0-alpine
2
- COPY nginx/dev/dev.conf /etc/nginx/nginx.conf
3
- COPY backend/static /usr/src/app/static/
2
+ COPY dev/dev.conf /etc/nginx/nginx.conf
4
3
EXPOSE 80
5
4
CMD ["nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change
1
+ node_modules
Original file line number Diff line number Diff line change 1
- FROM node:12.16.3
1
+ FROM node:10-alpine
2
2
3
3
WORKDIR /app/
4
4
5
5
COPY . .
6
6
7
- RUN npm install -g @quasar/cli && \
8
- npm install -g @vue/cli && \
9
- npm install -g @vue/cli-init
10
-
11
- COPY start_dev.sh .
12
-
13
7
CMD ["/app/start_dev.sh" ]
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /bin/sh
2
+
3
+ npm install -g @quasar/cli
2
4
3
5
npm install
4
6
You can’t perform that action at this time.
0 commit comments