Skip to content

Commit 69edb7b

Browse files
📝 Update readme to reflect new docker compose setup.
1 parent e48eebf commit 69edb7b

File tree

1 file changed

+63
-51
lines changed

1 file changed

+63
-51
lines changed

README.md

Lines changed: 63 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Writing code and developing in this application requires running three services:
3737
```bash
3838
dev up db
3939
#
40-
docker compose -f docker-compose.development.yml
40+
docker compose -f docker-compose.development.yml up db
4141
```
4242

4343
If you need to debug the restore, you can connect to the running SQL Server via
@@ -50,9 +50,68 @@ Writing code and developing in this application requires running three services:
5050

5151
5. To preview sent emails, the MailSlurper web interface is located at http://localhost:8081.
5252

53-
6. Install `asdf` using instructions at https://asdf-vm.com/guide/getting-started.html.
53+
6. To boot the api, test, db, s3 and email services you can use the docker compose setup.
5454

55-
7. Install the `nodejs` plugin via and the appropriate nodejs version.
55+
```bash
56+
dev up
57+
# or
58+
docker compose -f docker-compose.development.yml 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+
75+
```bash
76+
docker compose \
77+
-f docker-compose.dev.yml \
78+
exec -it db \
79+
/opt/mssql-tools/bin/sqlcmd \
80+
-U sa \
81+
-s localhost \
82+
-P Testing1122 \
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');"
98+
```
99+
100+
9. You should now be able to log in at http://localhost:8080, assuming you have an appropriate Auth0 or YNet account.
101+
102+
---
103+
104+
To access the Database console directly use:
105+
106+
```bash
107+
docker compose -f docker-compose.development.yml exec db /opt/mssql-tools/bin/sqlcmd -U sa -s localhost -P Testing1122
108+
```
109+
110+
#### Without Docker
111+
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.
56115

57116
```bash
58117
asdf plugin add nodejs
@@ -66,7 +125,7 @@ Writing code and developing in this application requires running three services:
66125
node -v
67126
```
68127

69-
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:
70129

71130
```bash
72131
cd src/api
@@ -91,53 +150,6 @@ Writing code and developing in this application requires running three services:
91150

92151
> You no longer need this step if you are using docker compose.
93152

94-
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:
95-
96-
```bash
97-
cd src/web
98-
npm install
99-
npm run start
100-
```
101-
102-
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.**
103-
104-
13. Manually add your user account info to the database via
105-
106-
```bash
107-
docker compose \
108-
-f docker-compose.dev.yml \
109-
exec -it db \
110-
/opt/mssql-tools/bin/sqlcmd \
111-
-U sa \
112-
-s localhost \
113-
-P Testing1122 \
114-
-d SFADB_DEV \
115-
-Q "INSERT INTO sfa.[USER](
116-
email
117-
, email_public
118-
, is_active
119-
, first_name
120-
, last_name
121-
, roles)
122-
VALUES (
123-
N'your.email@something.com'
124-
, N'your.email@something.com'
125-
, 1
126-
, N'YourFirstName'
127-
, N'YourLastName'
128-
, N'Admin');"
129-
```
130-
131-
14. You should now be able to log in at http://localhost:8080, assuming you have an appropriate Auth0 or YNet account.
132-
133-
---
134-
135-
To access the Database console directly use:
136-
137-
```bash
138-
docker compose -f docker-compose.development.yml exec db /opt/mssql-tools/bin/sqlcmd -U sa -s localhost -P Testing1122
139-
```
140-
141153
## Dev Command Usage
142154

143155
If you want a simpler interface to interact with docker compose you can use the `bin/dev` helper.

0 commit comments

Comments
 (0)