From 9917328fdc986732d4e063ea16fccaaf214aa36c Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Tue, 20 Feb 2024 20:47:29 +0100 Subject: [PATCH] Merge docker-compose.prebuild.yml into docker-compose.yml As Docker Compose allows to force self-build (using `--build`) or pull by default, it does not seem to make sense to separate two docker-compose.yml files. --- README.md | 16 ++++++++-------- docker-compose.prebuild.yml | 30 ------------------------------ docker-compose.yml | 3 +++ 3 files changed, 11 insertions(+), 38 deletions(-) delete mode 100644 docker-compose.prebuild.yml diff --git a/README.md b/README.md index 9cde4b82d..f51831cd5 100755 --- a/README.md +++ b/README.md @@ -12,25 +12,25 @@ CTFNote is a collaborative tool aiming to help CTF teams to organise their work. Before starting, make sure to fill in the information in the `.env` file. -### Pre-build images +### Running the Docker containers + +You can build and start CTFNote with `docker compose`. The default +configuration makes it super easy to start a new instance! Building CTFNote requires at least 3 GB of RAM. If you want to host CTFNote on a server with less than 3 GB of RAM, you can use the pre-build images from the GitHub Container Registry. -Download `docker-compose.yml` and `docker-compose.prebuild.yml` for example through cloning the repository and run: +To use the pre-build images, download `docker-compose.yml` (for example through cloning the repository) and run: ```shell -$ docker compose -f docker-compose.prebuild.yml up -d --pull always +$ docker compose up -d --pull always ``` -### Self-build images - -You can build and start CTFNote with `docker compose`. The default -configuration makes it super easy to start a new instance! +To self-build the images, clone the repository and run: ```shell -$ docker compose up -d +$ docker compose up -d --build ``` ### Accessing the instance diff --git a/docker-compose.prebuild.yml b/docker-compose.prebuild.yml deleted file mode 100644 index 1d4420216..000000000 --- a/docker-compose.prebuild.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: "3.7" -services: - api: - image: ghcr.io/tfns/ctfnote/api:latest - extends: - file: docker-compose.yml - service: api - db: - image: ghcr.io/tfns/ctfnote/db:latest - extends: - file: docker-compose.yml - service: db - front: - image: ghcr.io/tfns/ctfnote/front:latest - extends: - file: docker-compose.yml - service: front - hedgedoc: - extends: - file: docker-compose.yml - service: hedgedoc -volumes: - ctfnote-db: - name: ctfnote - ctfnote-uploads: - name: ctfnote-uploads - pad-uploads: - name: pad-uploads -networks: - ctfnote: diff --git a/docker-compose.yml b/docker-compose.yml index 6fa343da1..8ffddae43 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,7 @@ version: "3.7" services: api: + image: ghcr.io/tfns/ctfnote/api:latest build: context: "./api" networks: @@ -22,6 +23,7 @@ services: volumes: - ctfnote-uploads:/app/uploads db: + image: ghcr.io/tfns/ctfnote/db:latest build: context: "./db" restart: always @@ -34,6 +36,7 @@ services: networks: - ctfnote front: + image: ghcr.io/tfns/ctfnote/front:latest networks: - ctfnote restart: always