Skip to content

Build Base Image



We use the docker compose (not docker-compose) to run the project in containers, please pre-install Docker Engine or Docker Desktop before getting started.

Docker performance on macOS

If you are using docker on macOS, please choose VirtioFS as the file sharing implementation. (why)

Build the base image

Build the base image for local development.

docker build -t coscupweb-base:24.04.25 -f ./Dockerfile-base-dev ./


We've not registed the coscupweb-base on Docker Hub, therefor you need to build this image manually. In this way, you haven't needed to signup the Docker Hub account.

Setup the


Edit the, make MONGO_MOCK to be False.


At this section, just only setting up the MONGO_MOCK, the rest of settings please read this section of about

Compose up

Build the rest of app images

docker compose build --no-cache

Or directly execute up to build and run ...

docker compose up --build

Wait an amount until all services are available, open browser and visit to:


Because of the cookie with secure attributes (__Host-) at local in is not allowed for Chrome and Safari (Issue 1056543, Issue 1263426), the following steps are works only in Firefox.

Or you could temporarily comment on the codes of the flask session settings in ./
# comment them all
app.config['SESSION_COOKIE_NAME'] = '__Host-vl'
app.config['SESSION_COOKIE_SAMESITE'] = 'Lax'
app.config['SESSION_COOKIE_SECURE'] = True


For more information about the Compose file, see the Compose file reference.

Create first user account

To create a user for dev.

docker compose run --rm cmdapp dev user_add


If succeed, the command will display the message like below:

[!] Next step
 | Please visit one of these links to setup the cookie/session:

Open browser visit one of those links to:{sid}


This command will create 10 user accounts and the register sessions, so you need to feed the cookie for your browser.

Docs in docker

After starting up docker compose up, the docs of container will build all of the documents into a volume and directly attach to the nginx container as a static website.

Open browser and visit to: