Added Docker support
parent
87c1ea8c63
commit
83e97a0d20
|
@ -0,0 +1,2 @@
|
||||||
|
node_modules/
|
||||||
|
.*
|
|
@ -1,3 +1,4 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
|
data/
|
||||||
config/settings.json
|
config/settings.json
|
||||||
.vscode
|
.vscode
|
|
@ -0,0 +1,22 @@
|
||||||
|
FROM mhart/alpine-node:8
|
||||||
|
|
||||||
|
ENV NODE_VERSION 8.9.4
|
||||||
|
|
||||||
|
WORKDIR /var/expressCart
|
||||||
|
|
||||||
|
COPY bin/ /var/expressCart/bin/
|
||||||
|
COPY config/ /var/expressCart/config/
|
||||||
|
COPY public/ /var/expressCart/public/
|
||||||
|
COPY routes/ /var/expressCart/routes/
|
||||||
|
COPY views/ /var/expressCart/views/
|
||||||
|
|
||||||
|
COPY app.js /var/expressCart/
|
||||||
|
COPY package.json /var/expressCart/
|
||||||
|
COPY gulpfile.js /var/expressCart/
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
VOLUME /var/expressCart/data
|
||||||
|
|
||||||
|
EXPOSE 1111
|
||||||
|
ENTRYPOINT ["npm", "start"]
|
|
@ -19,6 +19,14 @@ Keeping expressCart running after closing the terminal can be done in a few ways
|
||||||
|
|
||||||
> Note: Node.js version 7.x or greater is needed.
|
> Note: Node.js version 7.x or greater is needed.
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
The easiest way to get up and running is using Docker. Once the Docker CLI is installed from [https://www.docker.com/get-docker](https://www.docker.com/get-docker).
|
||||||
|
|
||||||
|
1. Enter the root of the expressCart application
|
||||||
|
2. Run: `docker-compose up --build`
|
||||||
|
3. Visit [http://127.0.0.1:1111](http://127.0.0.1:1111) in your browser
|
||||||
|
|
||||||
## Admin
|
## Admin
|
||||||
|
|
||||||
Visit: [http://127.0.0.1:1111/admin](http://127.0.0.1:1111/admin)
|
Visit: [http://127.0.0.1:1111/admin](http://127.0.0.1:1111/admin)
|
||||||
|
|
|
@ -21,6 +21,6 @@
|
||||||
"customCss": ".footer{padding-top: 5px;}",
|
"customCss": ".footer{padding-top: 5px;}",
|
||||||
"currencySymbol": "£",
|
"currencySymbol": "£",
|
||||||
"paymentGateway": "stripe",
|
"paymentGateway": "stripe",
|
||||||
"databaseConnectionString": "mongodb://expresscart:test@ds139909.mlab.com:39909/expresscart",
|
"databaseConnectionString": "mongodb://127.0.0.1:27017/expresscart",
|
||||||
"theme": "Cloth"
|
"theme": "Cloth"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
expresscart:
|
||||||
|
image: "node:8"
|
||||||
|
build: .
|
||||||
|
container_name: "expresscart"
|
||||||
|
environment:
|
||||||
|
NODE_ENV: development
|
||||||
|
NODE_PATH: /
|
||||||
|
ports:
|
||||||
|
- "1111:1111"
|
||||||
|
links:
|
||||||
|
- mongodb
|
||||||
|
depends_on:
|
||||||
|
- mongodb
|
||||||
|
mongodb:
|
||||||
|
image: mongo:latest
|
||||||
|
container_name: "mongodb"
|
||||||
|
environment:
|
||||||
|
- MONGO_DATA_DIR=/data/db
|
||||||
|
- MONGO_LOG_DIR=/dev/null
|
||||||
|
# - MONGODB_USER="user"
|
||||||
|
# - MONGODB_PASS="pass"
|
||||||
|
volumes:
|
||||||
|
- ./data/db:/data/db
|
||||||
|
ports:
|
||||||
|
- 27017:27017
|
||||||
|
command: mongod --smallfiles --logpath=/dev/null
|
Loading…
Reference in New Issue