From c0bc8d03804739d8ff025f4bf71846b09569b75c Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Sun, 16 Feb 2020 10:59:37 -0800 Subject: Fix missing Django logs when using Docker Compose Fixed by allocating a pseudo-tty to the web and bot services in Docker Compose. --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml index 7281c7953..11deceae8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,6 +23,7 @@ services: - staff.web ports: - "127.0.0.1:8000:8000" + tty: true depends_on: - postgres environment: @@ -37,6 +38,7 @@ services: volumes: - ./logs:/bot/logs - .:/bot:ro + tty: true depends_on: - web environment: -- cgit v1.2.3 From 3aeb9e6ac6258fe3446788fc8a731fc8bb5922d4 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sat, 16 May 2020 12:23:52 +0200 Subject: Adding redis to docker-compose file. This is almost hilariously easy since we can just use the official image for it. --- docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml index 11deceae8..1bcf1008e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,9 @@ services: POSTGRES_PASSWORD: pysite POSTGRES_USER: pysite + redis: + image: redis:5.0.9 + web: image: pythondiscord/site:latest command: ["run", "--debug"] @@ -41,6 +44,7 @@ services: tty: true depends_on: - web + - redis environment: BOT_TOKEN: ${BOT_TOKEN} BOT_API_KEY: badbot13m0n8f570f942013fc818f234916ca531 -- cgit v1.2.3 From 8b5c1aabf58eb3c794cc61173bd7500a696a8376 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Mon, 25 May 2020 12:12:24 -0700 Subject: Expose the redis port to the host Useful for those that run redis with docker-compose but not the bot. The bot on the host won't have access to the Docker network in such case so the port must be exposed. --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml index 1bcf1008e..9884e35f0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,6 +14,8 @@ services: redis: image: redis:5.0.9 + ports: + - "127.0.0.1:6379:6379" web: image: pythondiscord/site:latest -- cgit v1.2.3 From 3845d01b5dcb494d37f4b10a9a7ffed5d77a96b8 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Fri, 5 Jun 2020 20:20:34 -0700 Subject: Add snekbox to the Docker compose file --- docker-compose.yml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml index 9884e35f0..cff7d33d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,6 +17,14 @@ services: ports: - "127.0.0.1:6379:6379" + snekbox: + image: pythondiscord/snekbox:latest + init: true + ipc: none + ports: + - "127.0.0.1:8060:8060" + privileged: true + web: image: pythondiscord/site:latest command: ["run", "--debug"] @@ -47,6 +55,7 @@ services: depends_on: - web - redis + - snekbox environment: BOT_TOKEN: ${BOT_TOKEN} BOT_API_KEY: badbot13m0n8f570f942013fc818f234916ca531 -- cgit v1.2.3 From a660a1ef1ed7d93bff6bf4cb1cdff279a1083324 Mon Sep 17 00:00:00 2001 From: ks129 <45097959+ks129@users.noreply.github.com> Date: Sun, 11 Oct 2020 08:07:19 +0300 Subject: Add Metricity DB URL to site (docker-compose.yml) --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml index cff7d33d6..8be5aac0e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,6 +41,7 @@ services: - postgres environment: DATABASE_URL: postgres://pysite:pysite@postgres:5432/pysite + METRICITY_DB_URL: postgres://pysite:pysite@postgres:5432/metricity SECRET_KEY: suitable-for-development-only STATIC_ROOT: /var/www/static -- cgit v1.2.3 From 244a72f6d716e3b0f4f5d2059a754a6abbeca673 Mon Sep 17 00:00:00 2001 From: Sebastiaan Zeeff Date: Sun, 15 Nov 2020 15:11:09 +0100 Subject: Use GHCR for the site container in docker-compose The docker-compose file should pull the site container from the GitHub Container Registry instead of DockerHub, as the latter will not receive new container images. Snekbox currently still pulls from DockerHub as it's not yet migrated to GHCR. Signed-off-by: Sebastiaan Zeeff --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml index 8be5aac0e..dc89e8885 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,7 +26,7 @@ services: privileged: true web: - image: pythondiscord/site:latest + image: ghcr.io/python-discord/site:latest command: ["run", "--debug"] networks: default: -- cgit v1.2.3 From ded520e374535b86013ca3a1de5c5eb1d3444bcb Mon Sep 17 00:00:00 2001 From: Sebastiaan Zeeff Date: Wed, 18 Nov 2020 18:55:36 +0100 Subject: Pull snekbox image from GHCR in docker-compose We're in the process of migrating snekbox to the GitHub Container Repository, which will replace DockerHub. I've changed docker-compose to reflect that change. Signed-off-by: Sebastiaan Zeeff --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml index dc89e8885..0002d1d56 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,7 +18,7 @@ services: - "127.0.0.1:6379:6379" snekbox: - image: pythondiscord/snekbox:latest + image: ghcr.io/python-discord/snekbox:latest init: true ipc: none ports: -- cgit v1.2.3