Skip to content

Commit

Permalink
Merge pull request #124 from gucorpling/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
amir-zeldes authored Jan 20, 2019
2 parents 0f00d84 + 91ff56c commit 001b24c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 33 deletions.
34 changes: 1 addition & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,48 +15,16 @@ You have three choices:
Unless you have a good reason to do (2) or (3), we recommend you do (1).

# Pull the latest Docker image
**Note:** currently, only the `gucorpling/gitdox:dev` image is available. We
hope to provide a stable release soon.

First, [install Docker](https://docs.docker.com/install/). You may be able to
install it using your platform's package manager.

(**Note: if your machine has Apache running, you should stop it first by running `sudo service apache2 stop`.**)

```bash
docker run -dit --restart unless-stopped --name gitdox-dev -p 80:80 gucorpling/gitdox:dev
```

GitDox should now be running the docker container you've set up, and you may
visit `http://localhost` on your machine to verify that it works. GitDox should
now always be running on your machine, even if you reboot it. If for some reason
you need to stop it manually, you may do so:

```bash
docker stop gitdox
# since you stopped it manually, it will no longer start automatically, even on
# reboot. to start again:
docker start gitdox
```

If you need to manually edit GitDox files, you may start a
bash session inside of the Docker container:

```bash
docker exec -it gitdox-instance bash
# now you are inside--install vim so you can edit files
apt install vim
cd /var/www/html
vim user/admin.ini # or whatever you need to edit
```

If you anticipate that you will need to heavily modify GitDox's files, you may wish
to have your GitDox folders live in your host machine's filesystem:

```bash
sudo git clone https://github.com/gucorpling/gitdox /opt/gitdox
sudo chown -R www-data:www-data /opt/gitdox
docker run -dit --restart unless-stopped --name gitdox -v /opt/gitdox:/var/www/html -p 80:80 gucorpling/gitdox:dev gitdox
docker run -dit --restart unless-stopped --name gitdox -v /opt/gitdox:/var/www/html -p 80:80 gucorpling/gitdox gitdox
```

These commands install GitDox under `/opt` in your host machine and allows you to modify them just as you would modify any other file on your machine. But in the Docker command, with the `-v` flag we tell it to mount this folder as `/var/www/html` in the container's filesystem. The files are shared bidirectionally: changes made in the container will flow to the host, and vice versa.
Expand Down
2 changes: 2 additions & 0 deletions templates/editor.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<script src="js/editor.js?version=4"></script>
<script src="js/validate.js"></script>
<!-- hack to make back button work as expected -->
<!--
{{^first_load}}
<script>
history.back();
</script>
{{/first_load}}
-->
</head>
<body>
{{{navbar_html}}}
Expand Down

0 comments on commit 001b24c

Please sign in to comment.