Skip to content

Commit d54a1b6

Browse files
committed
Document dockerisation
1 parent 549d120 commit d54a1b6

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,26 @@ Each application also has its own `tsconfig.json` file that extends the root con
4040

4141
Please refer to the TypeScript documentation for more details on the various compiler options and how to use them.
4242

43+
## Dockerisation
44+
45+
The applications in this project are containerized using Docker. Each application has its own `Dockerfile` that specifies how to build a Docker image for the application.
46+
There is also a `docker-compose.yml` file that defines a multi-container setup for running the applications together.
47+
48+
Since the project is a monorepo setup, it's important to run your commands from the root, for the Dockerfiles to have the correct context.
49+
50+
To build the Docker images for the applications, you can use the following commands:
51+
52+
- `docker build -t <image_name> -f api/Dockerfile .`: Builds a Docker image for the API application.
53+
- `docker build -t <image_name> -f client/Dockerfile .`: Builds a Docker image for the client application.
54+
55+
To run the apps using the `docker-compose` file, you can use the following command:
56+
57+
- `docker-compose up`: Starts the applications in a multi-container setup.
58+
- `docker-compose down`: Stops and removes the containers.
59+
- `docker-compose up --build`: Rebuilds the images and starts the containers.
60+
- `docker-compose up -d api --build`: Starts only the API application in detached mode and rebuilds the image.
61+
- `docker-compose up -d client --build`: Starts only the client application in detached mode and rebuilds the image.
62+
4363
## TODO
4464

4565
There are several aspects of the project that still need to be documented:

0 commit comments

Comments
 (0)