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
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,24 @@
3
3
## Running each container with docker
4
4
This example uses the `skynet` network, created with `$ docker network create skynet`. If you want to use your own network, replace `skynet` with the name of your own network.
5
5
6
-
6
+
### Starting the database
7
+
The database uses the official MySQL docker image directly, with the contents of the `sql` directory mounted inside (e.g. the `sql` directory will be shared with the container)
7
8
Standing in the source repo, start the database like this:
8
9
```
9
10
$ docker run -it --rm -d --name mysql1 --network skynet -e MYSQL_ROOT_PASSWORD=my-secret-pw -v $(pwd)/sql:/docker-entrypoint-initdb.d mysql
10
11
```
11
-
Notice the `-d` - this will make the container run in the background. If you have docker for mac or docker for windows installed, you should be able to see a container named `mysql1` running.
12
+
Notice the `-d` - this will make the container run in the background. If you have docker for mac or docker for windows installed you should be able to see a container named `mysql1` running.
12
13
13
-
The backend, which hosts both the API and the frontend can now be started like this:
14
+
### Build and run the backend
15
+
The backend, which hosts both the API and the frontend, has a couple of python dependencies which is nice to build into the container. Build with:
This will result in an image named `python_backend`. You should be able to see that with `$ docker images` or by clikcing the "Images" label in docker for desktop.
0 commit comments