Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmncit/fullstack-docker
https://github.com/mmncit/fullstack-docker
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mmncit/fullstack-docker
- Owner: mmncit
- Created: 2022-07-21T03:47:41.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-07-23T17:13:45.000Z (over 2 years ago)
- Last Synced: 2023-02-27T00:21:16.348Z (almost 2 years ago)
- Language: JavaScript
- Size: 14.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fullstack-docker
Node, Express and Mongo backend
Container are static and volumes are dynamic and can be connected to container for handling db
Compose a docker image:
```console
$docker-compose build
```Run the mongo service first:
Up a docker image to start with specific service
```console
$docker-compose up -d mongo
```List the containers
```console
$docker ps
``````console
$docker-compose up -d app
```Stop the containers
```console
$docker-compose stop
```Build the client docker image
```console
$cd client
$ docker build -t mmncit/client .
```List the images
```console
$docker images
```Run a container using this image
```console
$docker run -p 3000:3000 mmncit/client
```Run the fullstack container
```console
$docker-compose build
$docker-compose up -d mongo # build the mongo, api and client in sequence
$docker-compose up -d api
$docker-compose up -d client
$docker ps # list the running containers
$docker-compose stop # stop the current container
```