Commit 01b998b2 authored by Christophe Benz's avatar Christophe Benz
Browse files

Update

parent deaabea9
# validata-docker
Dockerfiles for https://git.opendatafrance.net/validata.
Run Validata with Docker.
## Requirements
First install [Docker](https://docs.docker.com/install/) and [docker-compose](https://docs.docker.com/compose/) if not already done.
## Quickstart
```
git clone https://github.com/abulte/validata-docker
```bash
git clone https://git.opendatafrance.net/validata/validata-docker.git
cd validata-docker
docker-compose up
docker-compose up -d
```
This will bring up both `validata-ui` (`http://localhost:5601`) and `validata-api` (`http://localhost:5600`).
This will bring up both Validata UI (`http://localhost:5000`) and Validata Web API (`http://localhost:5601`).
## Environment
`FLASK_ENV` variable is used, it is set by default to `FLASK_ENV=development` for both services.
TODO
## Build arguments
`FLASK_ENV` variable is used, it is set by default to `FLASK_ENV=development` for both services.
Arguments are available at build time to customize the pip package/repo used when installing validata components. [See a usage example here](https://github.com/abulte/validata-docker/blob/master/docker-compose.dev.yml#L7).
## See also
```
VALIDATA_CORE_REPO=git+https://git.opendatafrance.net/validata/validata-core.git
VALIDATA_API_REPO=git+https://git.opendatafrance.net/validata/validata-api.git
VALIDATA_UI_REPO=git+https://git.opendatafrance.net/validata/validata-ui.git
```
- https://git.opendatafrance.net/validata/validata-ui
- https://git.opendatafrance.net/validata/validata-api
\ No newline at end of file
FROM python:3
EXPOSE 5600
WORKDIR /srv
ARG VALIDATA_CORE_REPO=git+https://git.opendatafrance.net/validata/validata-core.git
ARG VALIDATA_API_REPO=git+https://git.opendatafrance.net/validata/validata-api.git
RUN pip install $VALIDATA_CORE_REPO
RUN pip install $VALIDATA_API_REPO
ENV FLASK_APP=validata_api.app
ENV FLASK_ENV=development
ENV FLASK_RUN_PORT=5600
CMD ["flask", "run", "--with-threads", "-h", "0.0.0.0"]
......@@ -2,30 +2,16 @@ version: '3'
services:
api:
build:
context: ./api
# use this to pull validata from your own fork or another branch
#args:
# VALIDATA_CORE_REPO: git+https://git.opendatafrance.net/abulte/validata-core.git@dev
# VALIDATA_API_REPO: git+https://git.opendatafrance.net/abulte/validata-api.git@dev
# image: git.opendatafrance.net:4567/validata/validata-api:latest
image: validata/api
ports:
- 5600:5600
# use environment and volumes to point to a custom schemas.toml
#environment:
# - VALIDATA_SCHEMAS_CONFIG=/schemas/schemas.toml
#volumes:
# - /git/schema.data.gouv.fr/:/schemas/
- 5001:5000
ui:
build:
context: ./ui
# use this to pull validata from your own fork or another branch
#args:
#VALIDATA_CORE_REPO: git+https://git.opendatafrance.net/abulte/validata-core.git@dev
#VALIDATA_UI_REPO: git+https://git.opendatafrance.net/abulte/validata-ui.git@etalab
# image: git.opendatafrance.net:4567/validata/validata-ui:latest
image: validata/ui
ports:
- 5601:5601
# use environment and volumes to point to a custom schemas.toml
#environment:
# - VALIDATA_SCHEMAS_CONFIG=/schemas/schemas.toml
#volumes:
# - /git/schema.data.gouv.fr/:/schemas/
- 5000:5000
links:
- api
environment:
API_VALIDATE_ENDPOINT: http://api:5000/validate
FROM python:3
EXPOSE 5601
WORKDIR /srv
ARG VALIDATA_CORE_REPO=git+https://git.opendatafrance.net/validata/validata-core.git
ARG VALIDATA_UI_REPO=git+https://git.opendatafrance.net/validata/validata-ui.git
RUN pip install $VALIDATA_CORE_REPO
RUN pip install $VALIDATA_UI_REPO
ENV FLASK_APP=validata_ui
ENV FLASK_ENV=development
ENV FLASK_RUN_PORT=5601
CMD ["flask", "run", "--with-threads", "-h", "0.0.0.0"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment