-
Notifications
You must be signed in to change notification settings - Fork 14
/
kongaDocker.md
45 lines (41 loc) · 1.87 KB
/
kongaDocker.md
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
# Konga Docker
## Using Docker
1. Prepare the database
```
docker run --rm --network=kong-net \
pantsel/konga:latest
-c prepare
-a postgres
-u postgres://konga@konga-database:5432/konga
```
2. Start Konga
```
$ docker run -p 1337:1337
--network {{kong-network}} \ // optional
-e "TOKEN_SECRET={{somerandomstring}}" \
-e "DB_ADAPTER=the-name-of-the-adapter" \ // 'mongo','postgres','sqlserver' or 'mysql'
-e "DB_HOST=your-db-hostname" \
-e "DB_PORT=your-db-port" \ // Defaults to the default db port
-e "DB_USER=your-db-user" \ // Omit if not relevant
-e "DB_PASSWORD=your-db-password" \ // Omit if not relevant
-e "DB_DATABASE=your-db-name" \ // Defaults to 'konga_database'
-e "DB_PG_SCHEMA=my-schema"\ // Optionally define a schema when integrating with prostgres
-e "NODE_ENV=production" \ // or 'development' | defaults to 'development'
--name konga \
pantsel/konga
// Alternatively you can use the full connection string to connect to a database
$ docker run -p 1337:1337
--network {{kong-network}} \ // optional
-e "TOKEN_SECRET={{somerandomstring}}" \
-e "DB_ADAPTER=the-name-of-the-adapter" \ // 'mongo','postgres','sqlserver' or 'mysql'
-e "DB_URI=full-connection-uri" \
-e "NODE_ENV=production" \ // or 'development' | defaults to 'development'
--name konga \
pantsel/konga
```
The GUI will be available at `http://{your server's public ip}:1337`
## Docker Compose
`konga.yml`
## References
- [Konga GitHub](https://github.com/pantsel/konga)
- [网关-docker-compose创建konga](https://blog.csdn.net/WeiJiaXiaoBao/article/details/112473150)