From 1569c783b2c602d6389901eff521bc82791378c1 Mon Sep 17 00:00:00 2001 From: alltheseteeth Date: Thu, 2 Jul 2020 11:03:03 -0700 Subject: [PATCH] docker dev doc clarification + contrib url update --- CONTRIBUTING.md | 2 +- docs/src/contributing_docker_development.md | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7827d8221..6d3176c3f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ # Contributing -See [here](https://dev.lemmy.ml/docs/contributing.html) for contributing Instructions. +See [here](https://dev.chapo.chat/docs/contributing.html) for contributing Instructions. diff --git a/docs/src/contributing_docker_development.md b/docs/src/contributing_docker_development.md index afa051072..f812f91ef 100644 --- a/docs/src/contributing_docker_development.md +++ b/docs/src/contributing_docker_development.md @@ -1,15 +1,28 @@ # Docker Development +## Setup + +> **NOTE**: Workflow is designed for Mac/Linux - it will work on Windows with WSL, but you'll need to do some extra steps. + +* **Mac** - Install [Docker Desktop for Mac](https://hub.docker.com/editions/community/docker-ce-desktop-mac) - this creates the VM that will build images, as well as installs other tools needed such as docker-compose. Once installed, go to settings and bump up the amount of RAM from 2gb to at least 4gb, or the build will fail. (8GB recommended) + +* **Linux** - You'll need to install Docker and docker-compose - there is a different installation for Docker per distro, but here is the [Ubuntu/Debian](https://docs.docker.com/engine/install/ubuntu/) instructions. Once done, go to the [docker-compose install directions](https://docs.docker.com/compose/install/) and pick the Linux instructions. + ## Running ```bash -sudo apt install git docker-compose git clone https://github.com/LemmyNet/lemmy cd lemmy/docker/dev sudo docker-compose up --no-deps --build ``` -and go to http://localhost:8536. +Upon running this, it will take a while to build, especially on slower systems. Later builds will be faster, based on how Docker creates images (using point in time snapshots). + +Also, trying to upload images will be broken until you set the permissions on your /volumes/pictrs folder - you need to run `chmod -R 991:991 /volumes/pictrs` from the root of the project, and will likely need to restart the docker-compose after that. + +Once everything is up and running, you can go to http://localhost:8536 to visit your local instance. + +## Additional Steps To speed up the Docker compile, add the following to `/etc/docker/daemon.json` and restart Docker. ``` @@ -20,5 +33,7 @@ To speed up the Docker compile, add the following to `/etc/docker/daemon.json` a } ``` +*(You can edit the daemon.json file on Docker Desktop under Settings > Docker Engine)* + If the build is still too slow, you will have to use a [local build](contributing_local_development.md) instead.