https://github.com/avin/node-docker
https://github.com/avin/node-docker
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/avin/node-docker
- Owner: avin
- Created: 2017-05-09T19:02:03.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-09T19:04:22.000Z (about 9 years ago)
- Last Synced: 2025-03-13T15:33:07.517Z (over 1 year ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker nodejs+mongodb container
node.js + mongodb service
## Install as systemd service
Install `docker`, `docker-compose`, `git` before
Clone repository
```
mkdir /opt -p && cd /opt
git clone https://github.com/avin/node-docker.git
```
Modify `docker-compose.yml` if you need.
Create `/etc/systemd/system/node-docker.service`:
```
[Unit]
Description=Node Mongo Docker Service
After=docker.service
Requires=docker.service
[Service]
ExecStart=/usr/local/bin/docker-compose -f /opt/node-docker/docker-compose.yml up --build
ExecStop=/usr/local/bin/docker-compose -f /opt/node-docker/docker-compose.yml stop -t 2
[Install]
WantedBy=multi-user.target
```
Install service
```
systemctl enable hosting-docker.service
```
## Notice
App folder `content/node` has to contain `start.sh` with start app instructions