Docker config update

This commit is contained in:
2018-03-19 17:37:12 +01:00
parent 625fd06a0f
commit e18a6262d7
2 changed files with 6 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
FROM ruby:2.4.3 FROM ruby:2.4.3
ENV BUILD_PACKAGES="apt-utils build-essential curl less nodejs sudo wget zsh libmysqlclient-dev ruby-serialport libserialport-dev" ENV BUILD_PACKAGES="apt-utils build-essential curl less nodejs sudo wget zsh libmysqlclient-dev libserialport-dev cron"
# throw errors if Gemfile has been modified since Gemfile.lock # throw errors if Gemfile has been modified since Gemfile.lock
RUN \ RUN \
@@ -17,4 +17,4 @@ RUN \
COPY . . COPY . .
CMD ["cd /usr/src/app && ruby smartmeter.rb"] CMD ["ruby ./smartmeter.rb"]

View File

@@ -2,14 +2,18 @@ version: '3'
services: services:
db: db:
container_name: smartmeter_db container_name: smartmeter_db
restart: unless-stopped
image: mysql image: mysql
environment: environment:
MYSQL_ROOT_PASSWORD: rootme MYSQL_ROOT_PASSWORD: rootme
MYSQL_DATABASE: smartmeter MYSQL_DATABASE: smartmeter
smartmeter: smartmeter:
container_name: smartmeter container_name: smartmeter
restart: unless-stopped
build: . build: .
command: 'ruby ./smartmeter.rb' command: 'ruby ./smartmeter.rb'
devices:
- "/dev/ttyUSB0:/dev/ttyUSB0"
volumes: volumes:
- .:/usr/src/app - .:/usr/src/app
depends_on: depends_on: