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

Update

parent deaabea9
# validata-docker # 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 ## Quickstart
``` ```bash
git clone https://github.com/abulte/validata-docker git clone https://git.opendatafrance.net/validata/validata-docker.git
cd validata-docker 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 ## 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
``` - https://git.opendatafrance.net/validata/validata-ui
VALIDATA_CORE_REPO=git+https://git.opendatafrance.net/validata/validata-core.git - https://git.opendatafrance.net/validata/validata-api
VALIDATA_API_REPO=git+https://git.opendatafrance.net/validata/validata-api.git \ No newline at end of file
VALIDATA_UI_REPO=git+https://git.opendatafrance.net/validata/validata-ui.git
```
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' ...@@ -2,30 +2,16 @@ version: '3'
services: services:
api: api:
build: # image: git.opendatafrance.net:4567/validata/validata-api:latest
context: ./api image: validata/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
ports: ports:
- 5600:5600 - 5001:5000
# 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/
ui: ui:
build: # image: git.opendatafrance.net:4567/validata/validata-ui:latest
context: ./ui image: validata/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
ports: ports:
- 5601:5601 - 5000:5000
# use environment and volumes to point to a custom schemas.toml links:
#environment: - api
# - VALIDATA_SCHEMAS_CONFIG=/schemas/schemas.toml environment:
#volumes: API_VALIDATE_ENDPOINT: http://api:5000/validate
# - /git/schema.data.gouv.fr/:/schemas/
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