You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+100Lines changed: 100 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,106 @@ Go to the URL:
64
64
65
65
* A forbidden files list can be configurad here. Enter each forbidden file as a PHP regular expression (RE) on a new line.
66
66
67
+
68
+
## Development using Makefile
69
+
70
+
To facilitate development, a `Makefile` is included to simplify Docker-based workflows.
71
+
72
+
### Requirements
73
+
74
+
- Docker
75
+
- Docker Compose
76
+
77
+
### Available Commands
78
+
79
+
-**Pull the latest images**:
80
+
To pull the latest Docker images from the registry, use:
81
+
82
+
```bash
83
+
make pull
84
+
```
85
+
> **Note**: Docker need to be logged in ghcr.io *([more info...])(https://docs.github.com/es/packages/working-with-a-github-packages-registry/working-with-the-container-registry)*
86
+
87
+
-**Start the development environment**:
88
+
To start the Docker containers in interactive mode, run:
89
+
90
+
```bash
91
+
make up
92
+
```
93
+
94
+
To start the containers in the background (daemon mode), run:
95
+
96
+
```bash
97
+
make upd
98
+
```
99
+
100
+
-**Build the Docker containers**:
101
+
You can build the Docker containers using the following command. This will also check if the `EXELEARNING_WEB_SOURCECODE_PATH` is defined in the `.env` file:
102
+
103
+
```bash
104
+
make build
105
+
```
106
+
107
+
> **Note**: If `EXELEARNING_WEB_SOURCECODE_PATH` is not defined, the build will fail and display an error message.
108
+
109
+
-**Access a shell in the Moodle container**:
110
+
To open a shell inside the running Moodle container, use:
111
+
112
+
```bash
113
+
make shell
114
+
```
115
+
116
+
-**Stop and remove containers**:
117
+
To stop and remove the running Docker containers, run:
118
+
119
+
```bash
120
+
make down
121
+
```
122
+
123
+
-**Clean up the environment**:
124
+
To stop and remove all Docker containers, volumes, and orphaned containers, run:
125
+
126
+
```bash
127
+
make clean
128
+
```
129
+
130
+
### Environment Variables
131
+
132
+
You can configure various settings using the `.env` file. If this file does not exist, it will be automatically generated by copying from `.env.dist`. Key variables to configure:
133
+
134
+
-`EXELEARNING_WEB_SOURCECODE_PATH`: Define the path to the eXeLearning source code if you want to work with a local version.
135
+
-`APP_PORT`: Define the port on which the application will run.
136
+
-`APP_SECRET`: Set a secret key for the application.
137
+
138
+
### Example Workflow
139
+
140
+
1. Ensure you have Docker running and properly configured.
141
+
2. Define your environment variables in the `.env` file or copy from `.env.dist`.
142
+
3. Pull the latest Docker images:
143
+
144
+
```bash
145
+
make pull
146
+
```
147
+
148
+
4. Start the environment:
149
+
150
+
```bash
151
+
make up
152
+
```
153
+
154
+
5. Build the environment if necessary:
155
+
156
+
```bash
157
+
make build
158
+
```
159
+
160
+
6. Once development is complete, stop and clean up the environment:
0 commit comments