mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-12 22:15:55 +00:00
Add dockerization and example compose file
This commit is contained in:
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
node_modules
|
||||||
|
npm-debug.log
|
||||||
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
FROM node:8
|
||||||
|
|
||||||
|
# Create app directory
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
# Bundle app source
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
ENV NODE_ENV=docker
|
||||||
|
|
||||||
|
RUN yarn
|
||||||
|
|
||||||
|
EXPOSE 8000
|
||||||
|
CMD [ "yarn", "start" ]
|
||||||
4
config/docker.json
Normal file
4
config/docker.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mongodb_uri" : "mongodb://mongodb:27017/homebrewery",
|
||||||
|
"secret" : "secret"
|
||||||
|
}
|
||||||
15
docker-compose.yml
Normal file
15
docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
version: '2'
|
||||||
|
services:
|
||||||
|
mongodb:
|
||||||
|
image: mongo:latest
|
||||||
|
volumes:
|
||||||
|
- /your/data/location:/data/db
|
||||||
|
homebrewery:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: homebrewery
|
||||||
|
environment:
|
||||||
|
MONGODB_URI: mongodb://mongodb/homebrewery
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
Reference in New Issue
Block a user