Skip to content

adding running locally documentation #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions documentation/config/en/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,9 @@ nav:
- Categories: tags-categories.md
- Tags: tags-tags.md
- Verification Process: verification-process.md
- Development Use:
- Common Info: dev/introduction.md
- Version Control: dev/github.md
- Container Management: dev/docker.md
- Running Locally: dev/running-locally.md
- Releases: releases.md
20 changes: 20 additions & 0 deletions documentation/docs/en/dev/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Docker
We are running the application within containers. Using Docker (or podman).
Information about using Docker is widly spread on the internet. We only have some basic information mentioned here.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

widly --> widely

Mainly to help the creating of images on the local machine. Mostly for testing purposes.

## Used commands

### WEB
cd <main-folder>/olm-web
docker build --rm -t phummelen/olm-web:latest -f deployment/web-dev.dockerfile .

docker run --rm -it -p 9000:9000 phummelen/olm-web:latest

### DOCS
cd <main-folder>/olm-documentation
docker build --rm -t phummelen/olm-docs:latest -f deploy/build/dockerfile .

### MTA
cd <main-folder>/olm-deploy
docker build --rm -t phummelen/olm-mta:latest -f mta/Dockerfile .
8 changes: 8 additions & 0 deletions documentation/docs/en/dev/github.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Version Control

We change our code on a regular basis. To have good code, we use version control on [GitHub](https://github.com/).

We have different repositories where our code resides. For different purposes and different update cadences.

For the use of Git, there are lots of tutorials. For now, it's not written out here.
*Maybe one of the other team members will add his (or her) experiences here*
8 changes: 8 additions & 0 deletions documentation/docs/en/dev/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Introduction

This software is opensource. That mean you can use, change, fork or whatever other something is convenient.
We still love if you participate in the community, to get better software, better data or spreading the same message all over the world.

To be able to assist the core team in the development, we have tried to have the software easy to use on the local machine.

This section is created to help you start up locally and help the development. If you have any question please reach out to the development team for help.
48 changes: 48 additions & 0 deletions documentation/docs/en/dev/running-locally.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Running locally

If you want to run the environment locally, that's possible!
You have to download the main repo(s) where a `docker-compose` file is in.
Also you have to have *Docker* (or podman) installed on you machine.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you --> your


With those two pre-requisites you can start the containers locally.
Be aware, for some features you need `keys`, which are not *free to use* from the community. If needed, reach out to the core team for help.

After first startup, we have to do some manual actions. In the future we gonna try to get these steps within setup-containers.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gonna --> going to


## Start
So, these are the (commandline) steps to start and initialize the environment

1. To start: `docker-compose up -d` (or `docker-compose start` if just stopped)
2. To enter the container (initialize): `docker exec -it olm-web /bin/bash`
3. To load dummy data (initialize): `php artisan migrate:fresh --seed`
4. Log out or the container using (after initialisation) `ctrl-d` or `exit`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initialisation --> initialization

5. Go to the local site: [direct](http://localhost:8000/) or via [proxy](http://localhost:8080)

NB: If you have initialized the database, you can skip the *initialize* steps. Step one is mandatory.

You should see the basic site now. Several function will work, several will not work.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function --> functions

To log in, there are two accounts:

|User|Password|
|----|--------|
|[email protected]|password|
|[email protected]|password|

## Stop
To stop the environment there are three options:

- stop only: `docker-compose stop`
- bring down: `docker-compose down`
- bring down and remove: `docker-compose down -v`

I'm mostly using the middle one. For me that's the best, because I do a lot of docker stuff on my machine.
Also, using this command will always use the latest version of the (newly pulled) images.

## Update images

To refresh the local images with the ones from the Docker registry, the main command is `docker pull [docker_image]`.
We currently have three own created images, so we have three commands to be given:

`docker pull phummelen/olm-mta`
`docker pull phummelen/olm-docs`
`docker pull phummelen/olm-web`