Skip to content

Commit

Permalink
feat: update docker-compose files and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TwistTheNeil committed Oct 31, 2023
1 parent a4d4651 commit cec2ae8
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 16 deletions.
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,22 @@ PUT /api/update : Update the Maxmind database

The application doesn't provide a database. A `PUT` request to `/api/update` will update the database and will ideally be protected by an api key (header: `X-API-KEY`). If `API_KEY` env var is not set, then the application will set one on startup and notify via STDOUT

### Building
### Screenshots of optional webapp
![screenshot](docs/screen.png)

### Building and running

#### using docker-compose

```bash
$ docker compose up --build
```

#### using docker-compose for dev

```bash
$ docker compose -f docker-compose.yml -f docker-compose.dev.yml --build
```

#### via npm and go
```bash
Expand All @@ -37,6 +52,3 @@ $ docker build .

The go binary will have the vue app embedded and serve it if `WEB` is enabled.
the binary will serve the embedded app in production mode (`RELEASE_MODE` = `true`). Or it will look at the filesystem for a `dist/` and serve that if it's not in production mode

### Screenshots of optional webapp
![screenshot](docs/screen.png)
6 changes: 6 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '3.4'

services:
rest-geoip:
build:
context: .
24 changes: 12 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ version: '3.4'

services:
rest-geoip:
build:
context: .
image: twistedneil/eleven:main
ports:
- 1323:1323
volumes:
- ./db:/opt/
environment:
- API_KEY=${API_KEY}
- MAXMIND_LICENSE=${MAXMIND_LICENSE}
- MAXMIND_DB_LOCATION=/opt/
- MAXMIND_DB=GeoLite2-City.mmdb
- LOGGING=${LOGGING}
- WEB=${WEB}
- LISTEN_ADDRESS=${LISTEN_ADDRESS}
- LISTEN_PORT=${LISTEN_PORT}
- MAPTILER_TOKEN=${MAPTILER_TOKEN}
- RELEASE_MODE=${RELEASE_MODE}
- GOIP_MAXMIND__DB_LOCATION=/opt/
- GOIP_MAXMIND__DB_FILE_NAME=GeoLite2-City.mmdb
- GOIP_PROGRAM__API_KEY=${GOIP_PROGRAM__API_KEY}
- GOIP_MAPTILER__TOKEN=${GOIP_MAPTILER__TOKEN}
- GOIP_MAXMIND__LICENSE_KEY=${GOIP_MAXMIND__LICENSE_KEY}
- GOIP_PROGRAM__ENABLE_LOGGING=${GOIP_PROGRAM__ENABLE_LOGGING}
- GOIP_PROGRAM__ENABLE_WEB=${GOIP_PROGRAM__ENABLE_WEB}
- GOIP_PROGRAM__LISTEN_ADDRESS=${GOIP_PROGRAM__LISTEN_ADDRESS}
- GOIP_PROGRAM__LISTEN_PORT=${GOIP_PROGRAM__LISTEN_PORT}
- GOIP_PROGRAM__RELEASE_MODE=${GOIP_PROGRAM__RELEASE_MODE}

0 comments on commit cec2ae8

Please sign in to comment.