Skip to content

Commit 2489ac5

Browse files
Merge pull request #6 from amine4567/docs/add-readme
docs: add README file with instructions on how to run the application inside a devcontainer or locally
2 parents 533d0f4 + 1873485 commit 2489ac5

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# The Retro Olympics web application
2+
3+
## Running the Repository Inside a DevContainer
4+
5+
This guide will walk you through the steps to run this repository inside a Development Container (DevContainer) using Visual Studio Code (VS Code). DevContainers provide a fully configured development environment that can include specific versions of programming languages, extensions, and tools configured exactly as needed for a project.
6+
7+
### Prerequisites
8+
9+
- **Visual Studio Code**: Ensure you have Visual Studio Code installed on your system. You can download it from [here](https://code.visualstudio.com/Download).
10+
- **Docker**: DevContainers use Docker to create and manage your development environments. Make sure Docker is installed and running on your system. Download Docker from [here](https://docs.docker.com/get-docker/).
11+
- **Dev Containers Extension**: This extension allows you to open any folder inside (or mounted into) a container and take advantage of VS Code's full feature set. Extension id: `ms-vscode-remote.remote-containers`
12+
13+
### Setup
14+
15+
1. **Open the Project in VS Code**: Start by opening the folder containing the project in VS Code.
16+
17+
2. **Reopen in Container**: Once the project is open, you'll see a popup in the lower right corner asking if you want to reopen the folder to develop inside a container. Click "Reopen in Container". If you don't see the popup, you can also open the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P` on macOS) and select `Dev Containers: Reopen in Container`.
18+
19+
3. **Wait for the Container to Build**: The first time you open your project in a container, VS Code will build the Docker image. This process can take some time depending on your internet connection and the complexity of the build. Subsequent loads will be much faster since Docker caches the build steps.
20+
21+
4. **Start Developing**: Once the container is built and started, VS Code will connect to it. You can now start editing, running, and debugging your project just like you would on your local machine.
22+
23+
## Additional Commands
24+
25+
- **Rebuild Container**: If you make changes to the devcontainer configuration, you may need to rebuild the container. You can do this by opening the Command Palette and selecting `Dev Containers: Rebuild Container`.
26+
27+
## Setup the application locally
28+
### Setup the backend
29+
1. Install `python 3.12`, the instructions may vary by OS and distribution.
30+
2. Make sure you have `pip` installed and linked to correct version of python.
31+
3. Install the necessary python libraries with the following command: `pip install -r backend/src/requirements-combined.txt`
32+
33+
### Setup the frontend
34+
TODO
35+
36+
## Run the application
37+
### Run the backend alone
38+
- Execute the following command: `invoke run-back`
39+
40+
- Check the hello world endpoint: `http://127.0.0.1:5000/api/v1/hello/`
41+
42+
You should see the following response in your browser or a tool like postman:
43+
```json
44+
{
45+
"message": "Hello World ! From the retro olympics backend !"
46+
}

0 commit comments

Comments
 (0)