🛠
Install from Source
If you want to build or extend the functionality, download the source code using Git and running Xtreme1 locally:
We are using Docker BuildKit to accelerate the building speed, such as cache Maven and NPM packages between builds. By default BuildKit is not enabled in Docker Desktop, you can enable it as follows. For more details, you can check the official document Build images with BuildKit.
# Set the environment variable to enable BuildKit just for once.
DOCKER_BUILDKIT=1 docker build .
DOCKER_BUILDKIT=1 docker compose up
# Or edit Docker daemon.json to enable BuildKit by default, the content can be something like '{ "features": { "buildkit": true } }'.
vi /etc/docker/daemon.json
# You can clear the builder cache if you encounter some package version related problem.
docker builder prune
git clone https://github.com/basicai/xtreme1.git
cd xtreme1
The docker-compose.yml default will pull application images from Docker Hub, if you want to build images from source code, you can comment on the service's image line and un-comment build line.
services:
backend:
# image: basicai/xtreme1-backend
build: ./backend
frontend:
# image: basicai/xtreme1-frontend
build: ./frontend
Then when you run
docker compose up
, it will first build the backend
and frontend
image and start services. Be sure to run docker compose build
when code changes, as the up command will only build images when it does not exist.You should not commit your change todocker-compose.yml
. To avoid this, you can copydocker-compose.yml
to a new filedocker-compose.develop.yml
, and modify this file as your development need, as this file is already added into.gitignore
. And you need to specify this specific file when runningDocker Compose
commands, such asdocker compose -f docker-compose.develop.yml
build.
Last modified 5mo ago