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-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,8 @@ docker-compose up -d
22
22
23
23
This will create (if not already done) and launch a whole development stack, based on [docker-compose.yml](docker-compose.yml), [docker-compose.override.yml](docker-compose.override.yml), [api/Dockerfile](api/Dockerfile) and [front/Dockerfile](front/Dockerfile) - following images:
24
24
25
-
*`my-docker-fullstack-project_front_development`: for react development (based on nodejs image)
26
-
*`my-docker-fullstack-project_api_development`: for golang in development mode (using [fresh](https://github.com/pilu/fresh) to build and restart the go webserver when you change the sources)
25
+
*`topheman/my-docker-fullstack-project_front_development`: for react development (based on nodejs image)
26
+
*`topheman/my-docker-fullstack-project_api_development`: for golang in development mode (using [fresh](https://github.com/pilu/fresh) to build and restart the go webserver when you change the sources)
27
27
* The `services.api.command` entry in [docker-compose.override.yml](docker-compose.override.yml) will override the default `RUN` command and start a dev server (instead of running the binary compiled in the container at build time)
28
28
29
29
Go to http://localhost:3000/ to access the frontend, you're good to go, the api is accessible at http://localhost:5000/.
@@ -37,7 +37,7 @@ docker-compose -f ./docker-compose.yml up
37
37
This will create (if not already done) and launch a whole production stack only based on [`docker-compose.yml`](docker-compose.yml) and [api/Dockerfile](api/Dockerfile) - following images:
38
38
39
39
* No nodejs image (it should not be shipped to production, the development image will be used to launch a container that will create the build artefacts with create-react-app).
40
-
*`my-docker-fullstack-project_api_production`: for the golang server (with the app compiled) - containing only the binary of the golang app (that way the image)
40
+
*`topheman/my-docker-fullstack-project_api_production`: for the golang server (with the app compiled) - containing only the binary of the golang app (that way the image)
41
41
* An nginx image *TODO*
42
42
43
43
## Tests
@@ -68,10 +68,9 @@ You can tell the difference of weight:
68
68
69
69
```
70
70
docker images
71
-
REPOSITORY TAG IMAGE ID CREATED SIZE
72
-
my-docker-fullstack-project_api_production latest 6021ac7d9d2f 43 minutes ago 11.5MB
73
-
my-docker-fullstack-project_api_development latest 755a7ed2bf72 44 minutes ago 426MB
74
-
my-docker-fullstack-project_front_development latest 2a71910b5e8c About an hour ago 225MB
71
+
topheman/my-docker-fullstack-project_api_production latest 01f1b575fae6 About a minute ago 11.5MB
72
+
topheman/my-docker-fullstack-project_api_development latest fff1ef3ec29e 8 minutes ago 426MB
73
+
topheman/my-docker-fullstack-project_front_development latest 4ed3aea602ef 22 hours ago 225MB
Don't want to use `docker-compose` (everything bellow is already specified in the `docker*.yml` files - only dropping to remember the syntax for the futur) ?
84
83
85
-
*`docker build ./api -t my-docker-fullstack-project_api_production`: build the `api` and tag it as `my-docker-fullstack-project_api_production` based on [api/Dockerfile](api/Dockerfile)
86
-
*`docker run -d -p 5000:5000 my-docker-fullstack-project_api_production`: runs the `my-docker-fullstack-project_api_production` image previously created in daemon mode and exposes the ports
87
-
*`docker build ./front -t my-docker-fullstack-project_front_development`: build the `front` and tag it as `my-docker-fullstack-project_front_development` based on [front/Dockerfile](front/Dockerfile)
88
-
*`docker run --rm -p 3000:3000 -v $(pwd)/front:/usr/front -v front-deps:/usr/front/node_modules my-docker-fullstack-project_front_development`:
89
-
* runs the `my-docker-fullstack-project_front_development` image previously created in attach mode
84
+
*`docker build ./api -t topheman/my-docker-fullstack-project_api_production`: build the `api` and tag it as `topheman/my-docker-fullstack-project_api_production` based on [api/Dockerfile](api/Dockerfile)
85
+
*`docker run -d -p 5000:5000 topheman/my-docker-fullstack-project_api_production`: runs the `topheman/my-docker-fullstack-project_api_production` image previously created in daemon mode and exposes the ports
86
+
*`docker build ./front -t topheman/my-docker-fullstack-project_front_development`: build the `front` and tag it as `topheman/my-docker-fullstack-project_front_development` based on [front/Dockerfile](front/Dockerfile)
87
+
*`docker run --rm -p 3000:3000 -v $(pwd)/front:/usr/front -v front-deps:/usr/front/node_modules topheman/my-docker-fullstack-project_front_development`:
88
+
* runs the `topheman/my-docker-fullstack-project_front_development` image previously created in attach mode
90
89
* exposes the port 3000
91
90
* creates (if not exists) and bind the volumes
92
91
* the container will be removed once you kill the process (`--rm`)
0 commit comments