Browse Source

Merge pull request #211 from cgspeck/docker-dev-env

Docker files for ease of development on PCs/macs
pull/213/head
Manuel83 GitHub 7 years ago
parent
commit
a477cb83a8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 0 deletions
  1. +14
    -0
      Dockerfile
  2. +15
    -0
      README.md
  3. +9
    -0
      docker-compose.yml

+ 14
- 0
Dockerfile View File

@@ -0,0 +1,14 @@
# Dockerfile for development on a pc/mac
FROM python:2

EXPOSE 5000

WORKDIR /usr/src/app

COPY requirements.txt ./

RUN pip install --no-cache-dir -r requirements.txt

COPY . .

CMD ["python", "run.py"]

+ 15
- 0
README.md View File

@@ -28,6 +28,21 @@ http://web.craftbeerpi.com/hardware/

CraftBeerPi 3.0 is a complete rewrite. Server as well as user interface. I recommend to use a second SD card for testing.

## Docker-based development

For developing this application or its plugins on a PC/Mac you can use the docker-compose file:

``` shell
$ docker-compose up
...
Starting craftbeerpi3_app_1 ... done
Attaching to craftbeerpi3_app_1
app_1 | [2018-08-13 12:54:44,264] ERROR in __init__: BUZZER not working
app_1 | (1) wsgi starting up on http://0.0.0.0:5000
```

The contents of this folder will be mounted to `/usr/src/craftbeerpi3` and the server will be accesible on `localhost:3000`.

## Donation

CraftBeerPi is a free & open source project. If you like to support the project I happy about a donation:


+ 9
- 0
docker-compose.yml View File

@@ -0,0 +1,9 @@
# docker-compose file for development on a pc/mac
version: '3.3'
services:
app:
build: .
ports:
- 5000:5000
volumes:
- $PWD:/usr/src/app

Loading…
Cancel
Save