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
- Automatic [token renewal](./api/app/service/auth_service.py#L44) with [a Flask middleware](./api/app/service/auth_service.py#L31)
18
+
- Automatic [token renewal](./api/app/service/auth_service.py#L45) with [a Flask middleware](./api/app/service/auth_service.py#L32)
19
19
- Swagger documentation
20
20
- Flask-Migrate
21
21
- Flask-SQLAlchemy (PostgreSQL was chosen)
22
-
-[Logging and logs rotation](./api/app/utils/Logger.py#L12)
22
+
-[Logging and logs rotation](./api/app/utils/Logger.py#L11)
23
23
-[Choose](./app/app/src/App.js#L65) between sidebar and navbar (or use both !)
24
24
- Responsive design
25
25
-[Production](./prod.docker-compose.yml) and [development](./docker-compose.yml) builds
@@ -46,7 +46,7 @@ With this boilerplate, you will be able to develop corporate-ready services AND
46
46
47
47
This section will explain how to properly run this project and set-up the LDAP server with one user.
48
48
49
-
1. Copy the `.env.example` to `.env`
49
+
1. Copy the `.env.example`file to `.env`
50
50
51
51
```bash
52
52
cp .env.example .env
@@ -133,3 +133,47 @@ This section will explain how to properly run this project and set-up the LDAP s
133
133
```
134
134
135
135
Access the UI at `https://localhost:8080`
136
+
137
+
### Deploy to K8S
138
+
139
+
I pretend you have here your K8S instance configured to be accessed by your `kubectl` CLI.
140
+
141
+
I've used [Scaleway Kapsule](https://www.scaleway.com/en/kubernetes-kapsule) to perform my tests. This is an easy way to have a Kubernetes cluster quickly ready.
142
+
143
+
1. Building production images (optional)
144
+
145
+
Images are tagged `flavienb/reactjs-flask-ldap-boilerplate-{api,web,nginx}:latest` by default. Edit it in`prod.docker-compose.yml` before building.
146
+
147
+
:information_source: You might be interested in pushing your images in a private registry (e.g: [Scaleway's Container Registry service](https://www.scaleway.com/en/container-registry/)).
148
+
149
+
```bash
150
+
docker-compose -f prod.docker-compose.yml build
151
+
```
152
+
153
+
Finally, `docker push` the 3 images and edit K8S' configurations :
154
+
155
+
- [k8s/app.yaml, line 26](k8s/app.yaml#L26)
156
+
- [k8s/api.yaml, line 21](k8s/api.yaml#L21)
157
+
- [k8s/nginx.yaml, line 21](k8s/nginx.yaml#L21)
158
+
159
+
2. Add a new `reactjs-flask-ldap-boilerplate` namespace
160
+
161
+
```bash
162
+
kubectl create namespace my-app
163
+
```
164
+
165
+
3. Configure your Ingress app endpoint
166
+
167
+
- **Edit** the env variables in [k8s/env-configmap.yaml](./k8s/env-configmap.yaml)
168
+
- **Edit** the app and phpldapadmin endpoints in [k8s/ingress.yaml, line 10 and 35](./k8s/ingress.yaml#L10)
169
+
- **Check** the PersistentVolumeClaim if you're not using Scaleway in all `*-pvc.yaml` files
170
+
171
+
Deploy with :
172
+
173
+
```bash
174
+
kubectl apply -f ./k8s
175
+
```
176
+
177
+
4. Configure the first user
178
+
179
+
**Create** your first user by accessing phpLDAPAdmin at [endpoint defined](./k8s/ingress.yaml#L35) and [following the LDAP user creation guide](./CREATE_LDAP_USER.md).
0 commit comments