blob: 60cb24e4b5c7d82c1d14eac1de2be26ecc8e49a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
## Example of Running Ponzu with Docker
This docker-compose contains 2 docker containers:
1. web - a basic nginx front end, with Javascript ajax accessing the /api
2. admin - an example ponzu container
The admin contain is based on the official Ponzu Docker image **NEEDS LINK**
### Running the example
```bash
# build the containers
docker-compose build
#start the containers in the background
docker-compose start -d
```
Visit the http://localhost:3000/admin/init to configure Ponzu.
Stop the on containers:
```
docker-compose stop
```
### Web Container
This nginx web container takes any incoming requests and if it matches `/api*` or `/admin*` it will then route it to the exposed ports :8080 on the ponzu container
### Ponzu - Admin Container
The ponzu container has a small [startup script](./admin/start_admin_.sh) which symlinks and logs or database files into a Docker Volume. If you need access to the ponzu logs, it is exposed a Volume.
#### Accessing the Ponzu terminal in Development
Make sure you have no running docker images `docker ps`. Then use the following command to start an interactive shell into the docker container.
```bash
# make sure the containers are built
docker-compose build
# start and tty into the container
docker run -v $(pwd)/admin:/go/src/project -it docker_admin
# run a ponzu command
ponzu generate content message title:"string" description:"string"
```
After the above your new `message.go` model is now available in your local filesystem. Use `docker-compose up -d` to see the new model in the admin.
|