Skip to content

Commit

Permalink
Changed the docker-compose.yml to use db/production.sqlite3 (closes
Browse files Browse the repository at this point in the history
#40).
  • Loading branch information
postmodern committed Dec 21, 2023
1 parent 125941d commit 518f8fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,13 @@ http://localhost:1337, if ran in a real terminal.

You can also use [docker-compose] to build and run the app:

[docker-compose]: https://docs.docker.com/compose/install/

```shell
$ docker-compose build --build-arg RONIN_UID=$(id -u) --build-arg RONIN_GID=$(id -g)
$ docker-compose build
$ docker-compose up
```

**Note:** In order for `docker-compose` to use [ronin-db] and [ronin-repos]
files, in `~/.local/share/ronin-db` and `~/.cache/ronin-repos`, the Docker
container user must have the same `UID` and `GID` as the host's user.

[docker-compose]: https://docs.docker.com/compose/install/

### Directory Structure

* `Gemfile` - defines all gem dependencies.
Expand Down
16 changes: 4 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ services:
ports:
- "1337:1337"
volumes:
- "${HOME}/.config/ronin-db:/home/ronin/.config/ronin-db:z"
- "${HOME}/.local/share/ronin-db:/home/ronin/.local/share/ronin-db:z"
- "${HOME}/.cache/ronin:/home/ronin/.cache/ronin:z"
- "${HOME}/.cache/ronin-repos:/home/ronin/.cache/ronin-repos:z"
- "${HOME}/.cache/ronin-nmap:/home/ronin/.cache/ronin-nmap:z"
- "${HOME}/.cache/ronin-masscan:/home/ronin/.cache/ronin-masscan:z"
- "./db:/app/db:z"
- "./log:/app/log:z"
- "./tmp:/app/tmp:z"
links:
Expand All @@ -24,6 +19,7 @@ services:
- PORT=1337
- REDIS_HOST=redis
- REDIS_PORT=6379
- DATABASE_URL=sqlite3:/app/db/production.sqlite3

sidekiq:
build:
Expand All @@ -35,19 +31,15 @@ services:
- "NET_BIND_SERVICE"
command: bundle exec sidekiq -C ./config/sidekiq.yml -r ./config/sidekiq.rb -r ./workers.rb -e production
volumes:
- "${HOME}/.config/ronin-db:/home/ronin/.config/ronin-db:z"
- "${HOME}/.local/share/ronin-db:/home/ronin/.local/share/ronin-db:z"
- "${HOME}/.cache/ronin:/home/ronin/.cache/ronin:z"
- "${HOME}/.cache/ronin-repos:/home/ronin/.cache/ronin-repos:z"
- "${HOME}/.cache/ronin-nmap:/home/ronin/.cache/ronin-nmap:z"
- "${HOME}/.cache/ronin-masscan:/home/ronin/.cache/ronin-masscan:z"
- "./db:/app/db:z"
- "./log:/app/log:z"
- "./tmp:/app/tmp:z"
links:
- redis
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- DATABASE_URL=sqlite3:/app/db/production.sqlite3

redis:
image: redis

0 comments on commit 518f8fc

Please sign in to comment.