ref: Makefile & scripts
This commit is contained in:
@@ -5,12 +5,12 @@ RUN apk add --no-cache gcc libc-dev linux-headers
|
||||
# install pypi packages
|
||||
COPY . /django_project
|
||||
RUN pip install --upgrade pip
|
||||
RUN pip install ./django_project
|
||||
RUN pip install /django_project
|
||||
RUN pip install uWSGI==2.0.21
|
||||
|
||||
COPY docker/app/uwsgi.ini /uwsgi.ini
|
||||
COPY docker/app/scripts /scripts
|
||||
COPY ./docker/uwsgi.ini /uwsgi.ini
|
||||
COPY ./scripts /scripts
|
||||
RUN chmod -R +x /scripts
|
||||
ENV PATH="/scripts:/py/bin:$PATH"
|
||||
|
||||
CMD ["run.sh"]
|
||||
CMD ["on-deploy.sh"]
|
||||
|
||||
4
Makefile
4
Makefile
@@ -7,9 +7,7 @@ help:
|
||||
|
||||
.PHONY: init
|
||||
init:
|
||||
python3 manage.py migrate
|
||||
python3 manage.py loaddata traits.json booking_types.json
|
||||
python3 manage.py createsuperuser
|
||||
./scripts/on-init.sh
|
||||
|
||||
.PHONY: get_columns
|
||||
get_columns:
|
||||
|
||||
@@ -5,4 +5,4 @@ A Django app for user management for makerspaces.
|
||||
|
||||
### Install
|
||||
|
||||
After install, run `make init` to create the initial database and super user.
|
||||
After install, run `on-init.sh` to create the initial database and super user.
|
||||
|
||||
@@ -2,7 +2,7 @@ version: '3'
|
||||
services:
|
||||
web:
|
||||
container_name: web
|
||||
build: ./docker/web/Dockerfile
|
||||
build: ./docker/web
|
||||
working_dir: /etc/nginx
|
||||
ports:
|
||||
- 80:80
|
||||
@@ -14,7 +14,7 @@ services:
|
||||
|
||||
app:
|
||||
container_name: app
|
||||
build: ./Dockerfile
|
||||
build: .
|
||||
working_dir: /django_project
|
||||
environment:
|
||||
DJANGO_SECRET_KEY: $DJANGO_SECRET_KEY
|
||||
|
||||
5
scripts/on-init.sh
Executable file
5
scripts/on-init.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
python manage.py migrate
|
||||
python manage.py loaddata traits.json booking_types.json
|
||||
python manage.py createsuperuser
|
||||
Reference in New Issue
Block a user