Skip to content

Commit

Permalink
🔥 Cleanup unused files and texts.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeribekker committed Oct 22, 2020
1 parent 25f7dbb commit 54489e0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 215 deletions.
69 changes: 8 additions & 61 deletions INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Prerequisites

You need the following libraries and/or programs:

* `Python`_ 3.6 or above
* `Python`_ 3.7 or above
* Python `Virtualenv`_ and `Pip`_
* `PostgreSQL`_ 10 or above
* `Node.js`_
Expand All @@ -44,7 +44,7 @@ development machine.

.. code-block:: bash
$ git clone [email protected]:maykinmedia/objecttypes.git
$ git clone [email protected]:maykinmedia/objecttypes-api.git
$ cd objecttypes
3. Install all required libraries.
Expand Down Expand Up @@ -169,7 +169,7 @@ The easiest way to get the project started is by using `Docker Compose`_.

.. code-block:: bash
$ git clone [email protected]:maykinmedia/objecttypes.git
$ git clone [email protected]:maykinmedia/objecttypes-api.git
Cloning into 'objecttypes'...
...
Expand All @@ -180,28 +180,28 @@ The easiest way to get the project started is by using `Docker Compose`_.
.. code-block:: bash
$ docker-compose up -d
Starting objecttypes_db_1 ... done
Starting objecttypes_web_1 ... done
Starting objecttypes-api_db_1 ... done
Starting objecttypes-api_web_1 ... done
It can take a while before everything is done. Even after starting the web
container, the database might still be migrating. You can always check the
status with:

.. code-block:: bash
$ docker logs -f objecttypes_web_1
$ docker logs -f objecttypes-api_web_1
3. Create an admin user and load initial data. If different container names
are shown above, use the container name ending with ``_web_1``:

.. code-block:: bash
$ docker exec -it objecttypes_web_1 /app/src/manage.py createsuperuser
$ docker exec -it objecttypes-api_web_1 /app/src/manage.py createsuperuser
Username: admin
...
Superuser created successfully.
$ docker exec -it objecttypes_web_1 /app/src/manage.py loaddata admin_index groups
$ docker exec -it objecttypes-api_web_1 /app/src/manage.py loaddata admin_index groups
Installed 5 object(s) from 2 fixture(s)
4. Point your browser to ``http://localhost:8000/`` to access the project's
Expand Down Expand Up @@ -247,59 +247,6 @@ all settings.
$ docker exec -it objecttypes /app/src/manage.py createsuperuser
Building and publishing the image
---------------------------------

Using ``bin/release-docker-image``, you can easily build and tag the image.

The script is based on git branches and tags - if you're on the ``master``
branch and the current ``HEAD`` is tagged, the tag will be used as
``RELEASE_TAG`` and the image will be pushed. If you want to push the image
without a git tag, you can use the ``RELEASE_TAG`` envvar.

The image will only be pushed if the ``JOB_NAME`` envvar is set. The image
will always be built, even if no envvar is set. The default release tag is
``latest``.

Example usage:

.. code-block:: bash
JOB_NAME=publish RELEASE_TAG=dev ./bin/release-docker-image.sh
Staging and production
======================

Ansible is used to deploy test, staging and production servers. It is assumed
the target machine has a clean `Debian`_ installation.

1. Make sure you have `Ansible`_ installed (globally or in the virtual
environment):

.. code-block:: bash
$ pip install ansible
2. Navigate to the project directory, and install the Maykin deployment
submodule if you haven't already:

.. code-block:: bash
$ git submodule update --init
3. Run the Ansible playbook to provision a clean Debian machine:

.. code-block:: bash
$ cd deployment
$ ansible-playbook <test/staging/production>.yml
For more information, see the ``README`` file in the deployment directory.

.. _Debian: https://www.debian.org/
.. _Ansible: https://pypi.org/project/ansible/

Settings
========
Expand Down
70 changes: 0 additions & 70 deletions bin/live2staging.sh

This file was deleted.

1 change: 0 additions & 1 deletion bin/live2staging_postimport.sql

This file was deleted.

19 changes: 0 additions & 19 deletions bin/live2staging_settings.sh

This file was deleted.

64 changes: 0 additions & 64 deletions bin/release_docker_image.sh

This file was deleted.

0 comments on commit 54489e0

Please sign in to comment.