Skip to content

Commit

Permalink
Update the READMEs to use the makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
cuttlefish committed Nov 9, 2018
1 parent 5b6ef8a commit fded723
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 26 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This guide assumes you are using a UNIX based operating system such as Linux or
git
docker
docker-compose
gmake
```
### Setup a Development Environment

Expand All @@ -37,12 +38,12 @@ Add the following to your `/etc/hosts` file
::1 docker
```

Run the following commands to start up the docker containers.
Run the following commands in the checked out git repo to start up the docker containers.

```
git submodule update --init --recursive
docker-compose pull
docker-compose up -d
make pull
make up
```

Your local site should now be available at `http://docker/`.
Expand Down
58 changes: 35 additions & 23 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,65 +2,77 @@
MapStory Docker Deployment
================


Local developer build
----------

Run all commands from the repository root.
The dev deployment uses the `master` tagged docker images.

Add the following to your `/etc/hosts` file
```

```raw
127.0.0.1 docker
::1 docker
```


```
```sh
git submodule update --init --recursive
docker-compose pull
docker-compose up -d
make pull
make up
```

Some modifications will require rebuilding the containers. We're working on minimizing this.
```
docker-compose pull
docker-compose build --pull

```sh
make build
```

To list the containers:

```sh
make ps
```
docker-compose ps

To view all logs:

```sh
make logs #this tails the logs, as though using -f
```

To view the logs of a container:
```

```sh
docker-compose logs <container>
docker-compose logs -f <container> #follow the log file
```

To view your interactive debug statements: (use ctrl+p ctrl+q to exit)
```

```sh
docker attach mapstory_django_1
```

To gain a shell in a container:
```

```sh
docker-compose exec <container> /bin/sh
```

To do refresh your deployment (this will wipe existing data):
To do wipeout your deployment (this will wipe existing data):

```sh
make purge
```
docker-compose kill
docker-compose rm -f
docker volume ls -q | grep mapstory_ | xargs docker volume rm
docker network prune -f
docker-compose up django_volumes
docker-compose up -d

To do refresh your deployment (this will wipe existing data, then rebuild and launch):

```sh
make recreate
```

If you are running into a Permission Denied error:
```
docker-compose up django_volumes
docker-compose up -d

```sh
make init
make up
```

0 comments on commit fded723

Please sign in to comment.