Organize Docker stuff

Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
This commit is contained in:
Drasko DRASKOVIC 2016-10-04 23:28:08 +02:00
parent 779b254c04
commit 2d8ddd7b0c
3 changed files with 55 additions and 33 deletions

View File

@ -1,27 +0,0 @@
###
# Copyright (c) Mainflux
#
# Mainflux server is licensed under an Apache license, version 2.0 license.
# All rights not explicitly granted in the Apache license, version 2.0 are reserved.
# See the included LICENSE file for more details.
###
###
# MongoDB
###
mongo:
image: mongo:latest
container_name: mainflux-mongodb
command: --smallfiles --nojournal
###
# Mainflux Lite
###
mainflux-lite:
image: mainflux/mainflux-lite:latest
container_name: mainflux-lite
links:
- mongo
ports:
- "7070:7070"

View File

@ -12,19 +12,19 @@ MAINTAINER Mainflux
RUN apk update && apk add git && rm -rf /var/cache/apk/*
# Copy the local package files to the container's workspace.
ADD . /go/src/github.com/mainflux/mainflux-lite
ADD . /go/src/github.com/mainflux/mainflux
RUN mkdir -p /config/lite
COPY config/config-docker.yml /config/lite/config.yml
RUN mkdir -p /etc/mainflux
COPY config/config-docker.toml /etc/mainflux/config.toml
# Get and install the dependencies
RUN go get github.com/mainflux/mainflux-lite
RUN go get github.com/mainflux/mainflux
###
# Run main command from entrypoint and parameters in CMD[]
###
CMD ["/config/lite/config.yml"]
CMD ["/etc/mainflux/config.toml"]
# Run mainflux command by default when the container starts.
ENTRYPOINT ["/go/bin/mainflux-lite"]
ENTRYPOINT ["/go/bin/mainflux"]

49
docker/docker-compose.yml Normal file
View File

@ -0,0 +1,49 @@
###
# Copyright (c) Mainflux
#
# Mainflux server is licensed under an Apache license, version 2.0 license.
# All rights not explicitly granted in the Apache license, version 2.0 are reserved.
# See the included LICENSE file for more details.
###
###
# InfluxDB
###
#influx:
# image: influxdb:latest
# container_name: mainflux-influxdb
# ports:
# - "8083:8083"
# - "8086:8086"
###
# MongoDB
###
mongo:
image: mongo:latest
container_name: mainflux-mongodb
command: --smallfiles --nojournal
###
# Emqttd
###
emqttd:
image: mainflux/emqttd-docker:latest
container_name: mainflux-emqttd
ports:
- "1883:1883"
- "8083:8083"
- "18083:18083"
###
# Mainflux Core Server
###
mainflux-server:
image: mainflux/mainflux:latest
container_name: mainflux-server
links:
- influx
- mongo
- emdttd