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
+67-60Lines changed: 67 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,43 +21,97 @@ Writing code and developing in this application requires running three services:
21
21
2. To run the database locally, you must have Docker installed as well as Docker Compose; afterwards, run the following command from the root directory:
22
22
23
23
```bash
24
-
docker compose -f docker-compose.dev.yml up -d
24
+
docker compose -f docker-compose.development.yaml up -d
25
25
```
26
26
27
27
or if your docker compose is old
28
28
29
29
```bash
30
-
docker-compose -f docker-compose.dev.yml up -d
30
+
docker-compose -f docker-compose.development.yaml up -d
31
31
```
32
32
33
33
This command will start API, SQL, Email, and S3 services, and bind them to appropriate ports on your local machine as specified in [docker-compose.development.yaml](./docker-compose.development.yaml).
34
34
35
35
3. When the database starts the first time, the database will be empty. To load some seed data, you must obtain a database backup, and put it into `/db/backups/sfa.bak`, then run the follow commands:
36
36
37
+
```bash
38
+
dev up db
39
+
#
40
+
docker compose -f docker-compose.development.yaml up db
41
+
```
42
+
43
+
If you need to debug the restore, you can connect to the running SQL Server via
44
+
45
+
```bash
46
+
docker compose -f docker-compose.development.yaml exec -it db bash
47
+
```
48
+
49
+
4. The first time you start the application, you must create a bucket named `documents` and an Access Key. Copy the access key id and secret and drop those values into the appropriate spots in the environment file. The Minio Web interface located at http://localhost:9090. Subsequent starts, it is not required to access the Minio interface.
50
+
51
+
5. To preview sent emails, the MailSlurper web interface is located at http://localhost:8081.
52
+
53
+
6. To boot the api, test, db, s3 and email services you can use the docker compose setup.
54
+
55
+
```bash
56
+
dev up
57
+
# or
58
+
docker compose -f docker-compose.development.yaml up
59
+
```
60
+
61
+
If you don't use docker see the "Without Docker" section
62
+
63
+
7. Last to start is the the Vue.js web front-end. To run this, open a second terminal window at this directory and run the following commands:
64
+
65
+
```bash
66
+
cd src/web
67
+
npm install
68
+
npm run start
69
+
```
70
+
71
+
You will now have the Vue CLI server hosting the application at http://localhost:8080 and you can begin editing the API or front-end code. **All changes to the files in the `src/api` and `src/web` will automatically reload there respective applications.**
72
+
73
+
8. Manually add your user account info to the database via
74
+
37
75
```bash
38
76
docker compose \
39
-
-f docker-compose.dev.yml \
77
+
-f docker-compose.development.yaml \
40
78
exec -it db \
41
79
/opt/mssql-tools/bin/sqlcmd \
42
80
-U sa \
43
81
-s localhost \
44
82
-P Testing1122 \
45
-
-Q "RESTORE DATABASE SFADB_DEV FROM DISK = N'backups/sfa.bak' WITH FILE = 1"
83
+
-d SFADB_DEV \
84
+
-Q "INSERT INTO sfa.[USER](
85
+
email
86
+
, email_public
87
+
, is_active
88
+
, first_name
89
+
, last_name
90
+
, roles)
91
+
VALUES (
92
+
N'your.email@something.com'
93
+
, N'your.email@something.com'
94
+
, 1
95
+
, N'YourFirstName'
96
+
, N'YourLastName'
97
+
, N'Admin');"
46
98
```
47
99
48
-
If you need to debug the restore, you can connect to the running SQL Server via
100
+
9. You should now be able to log in at http://localhost:8080, assuming you have an appropriate Auth0 or YNet account.
49
101
50
-
```bash
51
-
docker compose -f docker-compose.dev.yml exec -it db bash
52
-
```
102
+
---
53
103
54
-
4. The first time you start the application, you must create a bucket named `documents` and an Access Key. Copy the access key id and secret and drop those values into the appropriate spots in the environment file. The Minio Web interface located at http://localhost:9090. Subsequent starts, it is not required to access the Minio interface.
104
+
To access the Database console directly use:
55
105
56
-
5. To preview sent emails, the MailSlurper web interface is located at http://localhost:8081.
106
+
```bash
107
+
docker compose -f docker-compose.development.yaml exec db /opt/mssql-tools/bin/sqlcmd -U sa -s localhost -P Testing1122
108
+
```
57
109
58
-
6. Install `asdf` using instructions at https://asdf-vm.com/guide/getting-started.html.
110
+
#### Without Docker
59
111
60
-
7. Install the `nodejs` plugin via and the appropriate nodejs version.
112
+
1. Install `asdf` using instructions at https://asdf-vm.com/guide/getting-started.html.
113
+
114
+
2. Install the `nodejs` plugin via and the appropriate nodejs version.
61
115
62
116
```bash
63
117
asdf plugin add nodejs
@@ -71,7 +125,7 @@ Writing code and developing in this application requires running three services:
71
125
node -v
72
126
```
73
127
74
-
8. (optional) You will now have a local database with data ready for the API. To run the API, run the following commands:
128
+
3. (optional) You will now have a local database with data ready for the API. To run the API, run the following commands:
75
129
76
130
```bash
77
131
cd src/api
@@ -96,53 +150,6 @@ Writing code and developing in this application requires running three services:
96
150
97
151
> You no longer need this step if you are using docker compose.
98
152
99
-
12. Last to start is the the Vue.js web front-end. To run this, open a second terminal window at this directory and run the following commands:
100
-
101
-
```bash
102
-
cd src/web
103
-
npm install
104
-
npm run start
105
-
```
106
-
107
-
You will now have the Vue CLI server hosting the application at http://localhost:8080 and you can begin editing the API or front-end code. **All changes to the files in the `src/api` and `src/web` will automatically reload there respective applications.**
108
-
109
-
13. Manually add your user account info to the database via
110
-
111
-
```bash
112
-
docker compose \
113
-
-f docker-compose.dev.yml \
114
-
exec -it db \
115
-
/opt/mssql-tools/bin/sqlcmd \
116
-
-U sa \
117
-
-s localhost \
118
-
-P Testing1122 \
119
-
-d SFADB_DEV \
120
-
-Q "INSERT INTO sfa.[USER](
121
-
email
122
-
, email_public
123
-
, is_active
124
-
, first_name
125
-
, last_name
126
-
, roles)
127
-
VALUES (
128
-
N'your.email@something.com'
129
-
, N'your.email@something.com'
130
-
, 1
131
-
, N'YourFirstName'
132
-
, N'YourLastName'
133
-
, N'Admin');"
134
-
```
135
-
136
-
14. You should now be able to log in at http://localhost:8080, assuming you have an appropriate Auth0 or YNet account.
137
-
138
-
---
139
-
140
-
To access the Database console directly use:
141
-
142
-
```bash
143
-
docker compose -f docker-compose.dev.yml exec db /opt/mssql-tools/bin/sqlcmd -U sa -s localhost -P Testing1122
144
-
```
145
-
146
153
## Dev Command Usage
147
154
148
155
If you want a simpler interface to interact with docker compose you can use the `bin/dev` helper.
0 commit comments