Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) dockerize application #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:14

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

RUN npm install
# If you are building your code for production
# RUN npm ci --only=production

# Bundle app source
COPY . .

EXPOSE 3000
CMD [ "node", "server.js" ]
56 changes: 26 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,47 @@
# shopify-monitor v3

Monitor for Shopify based brands

![webapp](https://i.imgur.com/ZTGlrfq.png)

[Community Discord Server](https://discord.gg/BkDxcjT)

[macOS Install Video Guide](https://youtu.be/rpO5wdudfpQ)

[Windows Install Video Guide](https://youtu.be/KlgZdFRd5r4)
## Requirements

### Installation
- [Docker](https://docs.docker.com/get-docker/)

shopify-monitor requires [Node.js (LTS Version)](http://nodejs.org/).
## Installation

1.

![webapp](https://i.imgur.com/ZTGlrfq.png)

Setup:
```shell
git clone https://github.com/dzt/shopify-monitor.git
```

1.


```sh
git clone https://github.com/aabbccsmith/shopify-monitor.git
```shell
cd shopify-monitor
npm install # "sudo npm install" if you're on macOS or Linux
```

Configure information inside the `config.example.json` but be sure to rename it to `config.json` when you're done. Be sure to ONLY modify `port` and `mongodb_uri` fields.
1.

Run After Setup:

```sh
node server.js
```shell
docker-compose up --detach
```

More information on configuration will be added soon.
1.


Go to <127.0.0.1:3000>


## Project Roadmap

## Todo List
- [ ] Products Search Page.
- [ ] Slack
- [x] Edit Tasks
Expand All @@ -40,22 +50,8 @@ More information on configuration will be added soon.
- [x] YeezySupply
- [x] Quick Tasks

### Some more screenshots to flex
## Screenshots

![1](https://i.imgur.com/WbOxrBO.png)
![2](https://i.imgur.com/IUSU8b8.png)
![3](https://i.imgur.com/SVEh07S.png)

## License

```
The MIT License (MIT)

Copyright (c) 2017 Peter Soboyejo <http://petersoboyejo.com/> and aabbccsmith <https://majorcraft.xyz>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
2 changes: 1 addition & 1 deletion config.example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"port": 3000,
"mongodb_uri": "mongodb://127.0.0.1:27017",
"mongodb_uri": "mongodb://database:27017",
"slack": {
"active": false,
"webhook_url": ""
Expand Down
29 changes: 29 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: '3'

volumes:
local_mongo_data: {}

services:

frontend:
build: .
image: shopify_monitor_v3_frontend
container_name: frontend
links:
- "db:database"
volumes:
- .:/app
depends_on:
- db
ports:
- "3000:3000"
command: node server.js

db:
image: mongo:latest
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME:
MONGO_INITDB_ROOT_PASSWORD:
ports:
- "27017:27017"