-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make v3 standard operation * Update README.md Co-authored-by: W. Leighton Dawson <[email protected]> --------- Co-authored-by: W. Leighton Dawson <[email protected]>
- Loading branch information
1 parent
59a647f
commit 02a46d9
Showing
5 changed files
with
55 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,15 +33,15 @@ to [email protected]. | |
|
||
## Migrating to v3 | ||
|
||
* Depending on whether you're using letsencrypt: `docker compose -f docker-compose.yml down` | ||
or `docker compose -f docker-compose-letsencrypt.yml down` | ||
* If running on an older version of Docker, you will need to [upgrade](https://docs.docker.com/engine/install/). | ||
* `docker-compose` no longer works, and you will need to run `docker network prune` before bringing up your Canarytokens instance with `docker compose`. Canarytokens v2 will still work. | ||
* Pull the latest version of the `canarytokens-docker` repo. | ||
* Depending on whether you're using letsencrypt: `docker compose -f docker-compose.yml down` | ||
or `docker compose -f docker-compose-letsencrypt.yml down` | ||
* And correspondingly: `docker compose -f docker-compose-v3.yml up -d` | ||
or `docker compose -f docker-compose-v3-letsencrypt.yml up -d` | ||
* And correspondingly: `docker compose -f docker-compose.yml up -d` | ||
or `docker compose -f docker-compose-letsencrypt.yml up -d` | ||
|
||
NB: The updated `canarytokens-docker` repo no longer has the Dockerfile for Canarytokens v2, so running that requires using the tagged image `thinkst/canarytokens:v2_latest`. | ||
NB: The updated `canarytokens-docker` repo no longer has the Dockerfile for Canarytokens v2, so running that requires using the tagged image `thinkst/canarytokens:v2_latest`. We highly recommend moving to v3. Please contact us if you're battling with the migration. | ||
|
||
## Setup (in Ubuntu) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,63 @@ | ||
version: '2' | ||
version: '3' | ||
services: | ||
redis: | ||
restart: always | ||
image: redis:7.0.10 | ||
volumes: | ||
- ./data:/data/ | ||
- ./data:/data/ | ||
container_name: redis | ||
command: redis-server --appendonly yes --protected-mode no --save 60 1 | ||
frontend: | ||
restart: always | ||
image: thinkst/canarytokens:v2_latest | ||
image: thinkst/canarytokens | ||
build: ./canarytokens | ||
links: | ||
- redis | ||
ports: | ||
- "8082:8082" | ||
env_file: | ||
- frontend.env | ||
volumes: | ||
- ./uploads:/uploads/ | ||
- log-volume:/logs | ||
- ./frontend.env:/srv/frontend/frontend.env:ro | ||
- ./switchboard.env:/srv/switchboard/switchboard.env:ro | ||
- ./uploads:/uploads/ | ||
- log-volume:/logs | ||
container_name: frontend | ||
command: bash -c "rm -f frontend.pid; twistd -noy frontend.tac --pidfile=frontend.pid" | ||
command: bash -c "cd frontend; poetry run python -m uvicorn app:app --host 0.0.0.0 --port 8082" | ||
switchboard: | ||
restart: always | ||
image: thinkst/canarytokens:v2_latest | ||
image: thinkst/canarytokens | ||
build: ./canarytokens | ||
ports: | ||
- "53:53" | ||
- "53:53/udp" | ||
- "25:25" | ||
- "25:2500" | ||
- "3306:3306" | ||
- "53:5354" | ||
- "53:5354/udp" | ||
- "6443:6443" | ||
- "8083:8083" | ||
- "51820:51820/udp" | ||
links: | ||
- redis | ||
env_file: | ||
- switchboard.env | ||
volumes_from: | ||
- frontend | ||
volumes: | ||
- ./frontend.env:/srv/frontend/frontend.env:ro | ||
- ./switchboard.env:/srv/switchboard/switchboard.env:ro | ||
- ./uploads:/uploads/ | ||
- log-volume:/logs | ||
container_name: switchboard | ||
command: bash -c "rm -f switchboard.pid; twistd -noy switchboard.tac --pidfile=switchboard.pid" | ||
command: bash -c "cd switchboard; rm -f switchboard.pid; poetry run twistd -noy switchboard.tac --pidfile=switchboard.pid" | ||
nginx: | ||
restart: always | ||
image: thinkst/certbot-nginx | ||
build: ./certbot-nginx | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
links: | ||
- frontend | ||
- switchboard | ||
depends_on: | ||
- "frontend" | ||
- "switchboard" | ||
container_name: nginx | ||
env_file: | ||
- certbot.env | ||
volumes: | ||
- /etc/letsencrypt/:/etc/letsencrypt/ | ||
- ./nginx/conf.d:/etc/nginx/conf.d/ | ||
volumes: | ||
log-volume: |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters