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: ontime-back/docs/deployment/ec2.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ This service deploys to Amazon EC2 through `.github/workflows/deploy.yml`.
8
8
2. Add the required GitHub Actions secrets listed below.
9
9
3. Run the `Deploy` workflow manually from GitHub Actions, or push to the `deploy` branch.
10
10
11
-
The workflow builds the Spring Boot jar, creates deploy-only config files from GitHub Secrets, uploads them to `/home/ubuntu/OnTime-back`, and restarts Docker Compose on the EC2 instance.
11
+
The workflow builds the Spring Boot jar, creates deploy-only config files from GitHub Secrets, uploads them to `/home/ubuntu/OnTime-back`, and restarts Docker Compose on the EC2 instance. Docker Compose runs both the backend and a private MySQL 8 container on the same Docker network.
12
12
13
13
## Required EC2 Secrets
14
14
@@ -19,11 +19,11 @@ The workflow builds the Spring Boot jar, creates deploy-only config files from G
19
19
## Required Application Secrets
20
20
21
21
-`SPRING_APPLICATION_NAME`
22
-
-`SPRING_DATASOURCE_URL`
23
22
-`SPRING_DATASOURCE_USERNAME`
24
23
-`SPRING_DATASOURCE_PASSWORD`
25
24
-`SPRING_DATASOURCE_DRIVER_CLASS_NAME`
26
25
-`SPRING_JPA_HIBERNATE_DDL_AUTO`
26
+
-`MYSQL_ROOT_PASSWORD`
27
27
-`JWT_SECRETKEY`
28
28
-`JWT_ACCESS_EXPIRATION`
29
29
-`JWT_REFRESH_EXPIRATION`
@@ -35,14 +35,12 @@ The workflow builds the Spring Boot jar, creates deploy-only config files from G
35
35
-`APPLE_LOGIN_KEY`
36
36
-`APPLE_TEAM_ID`
37
37
-`AUTHKEY_743M7R5W3W`
38
-
-`SPRING_FLYWAY_URL`
39
-
-`SPRING_FLYWAY_USER`
40
-
-`SPRING_FLYWAY_PASSWORD`
41
38
-`ONTIME_PUSH_FIREBASE_ADMINSDK`
42
39
43
40
## Optional Secrets
44
41
45
42
-`SPRING_JPA_DATABASE_PLATFORM` defaults to `org.hibernate.dialect.MySQL8Dialect`.
43
+
-`MYSQL_DATABASE` defaults to `ontime`.
46
44
-`FEATURE_APPLE_LOGIN_ENABLED` defaults to `true`.
47
45
- Google and Kakao OAuth provider/registration secrets are included by the workflow when configured.
48
46
@@ -54,7 +52,10 @@ The deploy workflow writes these files under `/home/ubuntu/OnTime-back`:
54
52
-`Dockerfile`
55
53
-`docker-compose.yml`
56
54
-`config/application.properties`
55
+
-`config/mysql.env`
57
56
-`secrets/firebase-adminsdk.json`
58
57
-`secrets/AuthKey_743M7R5W3W.p8`
59
58
59
+
MySQL data is stored in the Docker volume `mysql-data`. Removing that volume deletes the deployed database.
60
+
60
61
Do not commit local `application.properties`, Firebase service account JSON, Apple `.p8` keys, or `.env` files.
0 commit comments