stash
This commit is contained in:
parent
4f2fe011c0
commit
6fcdd1eefa
4 changed files with 22 additions and 9 deletions
|
|
@ -11,6 +11,7 @@ WORKDIR /code
|
|||
# Install dependencies
|
||||
COPY requirements.txt /code/
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
RUN touch /mnt/db.sqlite3 && touch /mnt/testdata.py && mkdir /mnt/userfiles
|
||||
|
||||
# Run the application
|
||||
CMD ["sh", "-c", "python manage.py migrate && python manage.py runserver 0.0.0.0:8000 --insecure"]
|
||||
|
|
|
|||
|
|
@ -5,12 +5,16 @@ services:
|
|||
build:
|
||||
context: ../backend/
|
||||
dockerfile: ../deploy/dev/Dockerfile.backend
|
||||
environment:
|
||||
TOOLSHED_DB_PATH: /mnt/db.sqlite3
|
||||
TOOLSHED_USERFILES_PATH: /mnt/userfiles
|
||||
TOOLSHED_SETUP_PATH: /mnt/testdata.py
|
||||
volumes:
|
||||
- ../backend:/code
|
||||
- ../deploy/dev/instance_a/a.env:/code/.env
|
||||
- ../deploy/dev/instance_a/testdata.py:/code/testdata.py
|
||||
- ../deploy/dev/instance_a/a.sqlite3:/code/db.sqlite3
|
||||
- ../deploy/dev/instance_a/userfiles:/code/userfiles
|
||||
- ../deploy/dev/instance_a/testdata.py:/mnt/testdata.py
|
||||
- ../deploy/dev/instance_a/a.sqlite3:/mnt/db.sqlite3
|
||||
- ../deploy/dev/instance_a/userfiles:/mnt/userfiles
|
||||
expose:
|
||||
- 8000
|
||||
command: bash -c "python configure.py; python configure.py testdata; python manage.py runserver 0.0.0.0:8000 --insecure"
|
||||
|
|
@ -19,12 +23,16 @@ services:
|
|||
build:
|
||||
context: ../backend/
|
||||
dockerfile: ../deploy/dev/Dockerfile.backend
|
||||
environment:
|
||||
TOOLSHED_DB_PATH: /mnt/db.sqlite3
|
||||
TOOLSHED_USERFILES_PATH: /mnt/userfiles
|
||||
TOOLSHED_SETUP_PATH: /mnt/testdata.py
|
||||
volumes:
|
||||
- ../backend:/code
|
||||
- ../deploy/dev/instance_b/b.env:/code/.env
|
||||
- ../deploy/dev/instance_b/testdata.py:/code/testdata.py
|
||||
- ../deploy/dev/instance_b/b.sqlite3:/code/db.sqlite3
|
||||
- ../deploy/dev/instance_b/userfiles:/code/userfiles
|
||||
- ../deploy/dev/instance_b/testdata.py:/mnt/testdata.py
|
||||
- ../deploy/dev/instance_b/b.sqlite3:/mnt/db.sqlite3
|
||||
- ../deploy/dev/instance_b/userfiles:/mnt/userfiles
|
||||
expose:
|
||||
- 8000
|
||||
command: bash -c "python configure.py; python configure.py testdata; python manage.py runserver 0.0.0.0:8000 --insecure"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue