Skip to content

Commit 9833d60

Browse files
committed
deploy: preserve mysql volume explicitly
1 parent cfc0fdf commit 9833d60

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

ontime-back/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ services:
3535

3636
volumes:
3737
mysql-data:
38+
name: ontime-mysql-data

ontime-back/docs/deployment/ec2.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ The deploy workflow writes these files under `/home/ubuntu/OnTime-back`:
5656
- `secrets/firebase-adminsdk.json`
5757
- `secrets/AuthKey_743M7R5W3W.p8`
5858

59-
MySQL data is stored in the Docker volume `mysql-data`. Removing that volume deletes the deployed database.
59+
MySQL data is stored in the Docker volume `ontime-mysql-data`. Normal deploys run `docker compose down` without `-v`, so this volume is preserved across backend redeploys. Removing that volume deletes the deployed database.
60+
61+
Keep `SPRING_JPA_HIBERNATE_DDL_AUTO` set to `validate` or another non-destructive value for production. Values such as `create` or `create-drop` can recreate schema and destroy data.
6062

6163
Do not commit local `application.properties`, Firebase service account JSON, Apple `.p8` keys, or `.env` files.

0 commit comments

Comments
 (0)