diff --git a/documentation/config/en/mkdocs.yml b/documentation/config/en/mkdocs.yml index 9884dbd..102c6a2 100644 --- a/documentation/config/en/mkdocs.yml +++ b/documentation/config/en/mkdocs.yml @@ -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 diff --git a/documentation/docs/en/dev/docker.md b/documentation/docs/en/dev/docker.md new file mode 100644 index 0000000..3a370c0 --- /dev/null +++ b/documentation/docs/en/dev/docker.md @@ -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. +Mainly to help the creating of images on the local machine. Mostly for testing purposes. + +## Used commands + +### WEB +cd /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 /olm-documentation +docker build --rm -t phummelen/olm-docs:latest -f deploy/build/dockerfile . + +### MTA +cd /olm-deploy +docker build --rm -t phummelen/olm-mta:latest -f mta/Dockerfile . diff --git a/documentation/docs/en/dev/github.md b/documentation/docs/en/dev/github.md new file mode 100644 index 0000000..98d8f9a --- /dev/null +++ b/documentation/docs/en/dev/github.md @@ -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* \ No newline at end of file diff --git a/documentation/docs/en/dev/introduction.md b/documentation/docs/en/dev/introduction.md new file mode 100644 index 0000000..e9a1947 --- /dev/null +++ b/documentation/docs/en/dev/introduction.md @@ -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. \ No newline at end of file diff --git a/documentation/docs/en/dev/running-locally.md b/documentation/docs/en/dev/running-locally.md new file mode 100644 index 0000000..0667885 --- /dev/null +++ b/documentation/docs/en/dev/running-locally.md @@ -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. + +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. + +## 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` +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. +To log in, there are two accounts: + +|User|Password| +|----|--------| +|admin@example.com|password| +|user@example.com|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`