Skip to content
Snippets Groups Projects
Commit 10574955 authored by Alice Poggioli's avatar Alice Poggioli
Browse files

add docker install

parent ce692a30
No related branches found
No related tags found
No related merge requests found
Develop SIB server packages
##########################
How to develop SIB server packages
###############################
LDP packages represent capabilites the server could support. Each may have it's own configuration depending of what mission it fulfills. There is no limit of what a LDP package can do.
Requirements
=============
......
......@@ -30,6 +30,9 @@ Create a project structure from a production template:
For a development server remove the --production flag.
Configure your LDP packages
============================
......@@ -136,4 +139,49 @@ and URLs in urls.py:
url(r'^api/admin/', admin.site.urls),
]
Note: Alwaysdata static config /api/static/=/static/
\ No newline at end of file
Note: Alwaysdata static config /api/static/=/static/
Initiate the server with Docker
===============================
This is not intended to support production running.
Setup your SIB server
---------------------
Create your packages.yml according to the documentation.
Create the Dockerfile:
.. code-block:: bash
FROM python:3.6
ENV PATH="/root/.local/bin:${PATH}"
RUN pip install --user -U sib-manager
WORKDIR /opt
RUN cd /opt/ && sib startproject sib_server
ADD packages.yml /opt/sib_server/packages.yml
RUN cd /opt/sib_server && sib install sib_server
EXPOSE 8000
CMD cd /opt/sib_server && python manage.py runserver 0.0.0.0:8000
Build the image:
.. code-block:: bash
docker build -t sibserver .
Run the container:
.. code-block:: bash
docker run --rm -p 127.0.0.1:8000:8000 -d sibserver
Serve your client app
---------------------
Launch a container from within your code folder:
.. code-block:: bash
docker run --rm -v $PWD:/code -w /code -u $UID -it -p 127.0.0.1:3000:3000 node npm install && npm run watch
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment