Skip to content
Open
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
config.php

cache/*.cache

# IDEs
/.project
/nbproject
/.vscode
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: php

sudo: required

services:
- docker

before_install:
- make

script:
- make lint
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM php:7-alpine

ADD . /usr/src/code
WORKDIR /usr/src/code
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
all: images

images:
docker-compose build

up:
docker-compose up de-map

lint:
docker-compose run --rm php sh -c 'find . -name "*.php" -print0 | xargs -0 -n1 php -l'
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/mjainta/de-map.svg?branch=master)](https://travis-ci.org/mjainta/de-map)

de-map
======

Expand All @@ -24,3 +26,29 @@ Das JSON-Schema ist in schema/nodelist-schema.json zu finden, gegen das man die
Für den Export dieser Liste habe ich 2 PHP-Klassen beispielhaft implementiert https://github.com/StilgarBF/nodelistexport

Die Karte wird dieses Format in Kürze auch verarbeiten.

### Docker

Build the images

```shell
make
```

Do a linting on all php-files

```shell
make lint
```

Fire a php server with de-map running data.php up (does not use code changed after `make` or `make images`)

```shell
make up
```

Execute a single command for the current source code (development)

```shell
docker-compose run --rm php php data.php
```
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '2'
services:
php:
build: .
image: "php"
volumes:
- .:/usr/src/code

de-map:
build: .
command: php data.php