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
├── service/Dockerfile # Service container image (build context: repo root)
239
+
├── service/Dockerfile # Service container image (build context: repo root)
234
240
└── pom.xml # Root Maven POM
235
241
```
236
242
@@ -266,8 +272,9 @@ The backend service exposes REST APIs at `http://localhost:8080/api`:
266
272
267
273
## 🗄️ Database
268
274
269
-
The application uses PostgreSQL with Flyway for database migrations. All migrations are located in:
270
-
-`service/src/main/resources/db/migration/`
275
+
The application uses PostgreSQL with Flyway for database migrations. All migrations are in the **`flyway`** module:
276
+
277
+
-`flyway/src/main/resources/db/migration/`
271
278
272
279
The database schema includes:
273
280
@@ -326,17 +333,24 @@ docker compose logs -f service
326
333
327
334
## ☸️ Kubernetes deployment
328
335
329
-
**Flow:** deploy common cluster config from the **parent**`deployment/`, then **build images and deploy from each module** (website, service). There is no central “build and push all”; each module builds and pushes its own image, then deploys. See **[deployment/README.md](deployment/README.md)** for layout and backend prerequisites.
336
+
**Flow:** deploy common cluster config from the **parent**`deployment/`, then **build images and deploy from each
337
+
module** (website, flyway, service). Flyway and service are separate: deploy Flyway first (migrations), then the backend
338
+
service. There is no central “build and push all”; each module builds and pushes its own image, then deploys. See *
339
+
*[deployment/README.md](deployment/README.md)** for layout and prerequisites.
330
340
331
-
**Step 1** applies: namespace, Docker Hub secret, ConfigMap, Secrets, Traefik Let's Encrypt, Traefik middleware, and Traefik IngressRoute (routing for java-swing.com and api.java-swing.com). Step 2 deploys the website and backend so traffic can reach them.
332
341
333
342
```bash
334
343
# 1. Deploy common cluster config from parent (namespace, secret, ConfigMap, Secrets, Traefik IngressRoute + middleware)
335
344
./deployment/scripts/k3s/deploy-to-k3s.sh
336
345
337
-
# 2. Build, push, and deploy each module from its own folder
346
+
# 2. Website (from website/)
338
347
cd website && ./deployment/scripts/build-and-push.sh <version>&& ./deployment/scripts/deploy.sh <version>
339
-
cd ../service && ./deployment/scripts/build-and-push.sh <version>&& ./deployment/scripts/deploy.sh <version>
348
+
349
+
# 3. Flyway migrations (from flyway/) — run before the backend service
350
+
cd flyway && ./deployment/scripts/build-and-push.sh <version>&& ./deployment/scripts/deploy.sh <version>
351
+
352
+
# 4. Backend service (from service/)
353
+
cd service && ./deployment/scripts/build-and-push.sh <version>&& ./deployment/scripts/deploy.sh <version>
0 commit comments