Skip to content

Commit

Permalink
Merge pull request #5 from Asone/feature/api-senat
Browse files Browse the repository at this point in the history
Feature/api senat
  • Loading branch information
Asone committed Nov 5, 2018
2 parents cdafcef + c8f9460 commit b5679e6
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ an-data-fetcher :
docker-compose run assemblee cargo run -p tricoteuses_api_assemblee_open_data_fetcher -- -c Config.toml
an-pics-fetcher :
docker-compose run assemblee cargo run -p tricoteuses_api_assemblee_photos_fetcher -- -c Config.toml -v
senat-data-fetcher:
docker-compose run senat cargo run -p tricoteuses_api_senat_open_data_fetcher -- -c Config.toml -v
senat-pics-fetcher:
docker-compose run senat cargo run -p tricoteuses_api_senat_photos_fetcher -- -c Config.toml -v
hatvp-data-fetcher:
docker-compose run hatvp cargo run -p tricoteuses_api_hatvp_fetcher -- -c Config.toml -v
wikidata-data-fetcher:
docker-compose run wikidata cargo run -p tricoteuses_api_wikidata_fetcher -- -c Config.toml -v
all-data-fetch:
docker-compose run assemblee cargo run -p tricoteuses_api_assemblee_open_data_fetcher -- -c Config.toml
docker-compose run assemblee cargo run -p tricoteuses_api_assemblee_photos_fetcher -- -c Config.toml -v
docker-compose run senat cargo run -p tricoteuses_api_senat_photos_fetcher -- -c Config.toml -v
docker-compose run senat cargo run -p tricoteuses_api_senat_open_data_fetcher -- -c Config.toml -v
docker-compose run hatvp cargo run -p tricoteuses_api_hatvp_fetcher -- -c Config.toml -v
docker-compose run wikidata cargo run -p tricoteuses_api_wikidata_fetcher -- -c Config.toml -v
29 changes: 29 additions & 0 deletions _provisioning/senat-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM rustlang/rust:nightly

LABEL AUTHOR="Nelson Herbin <[email protected]>"
LABEL NAME=tricoteuses-senat-api
LABEL VERSION=1

RUN apt-get update && \
apt-get install -y unzip graphicsmagick

ENV JQ_VERSION='1.5'

RUN wget --no-check-certificate https://raw.githubusercontent.com/stedolan/jq/master/sig/jq-release.key -O /tmp/jq-release.key && \
wget --no-check-certificate https://raw.githubusercontent.com/stedolan/jq/master/sig/v${JQ_VERSION}/jq-linux64.asc -O /tmp/jq-linux64.asc && \
wget --no-check-certificate https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 -O /tmp/jq-linux64 && \
gpg --import /tmp/jq-release.key && \
gpg --verify /tmp/jq-linux64.asc /tmp/jq-linux64 && \
cp /tmp/jq-linux64 /usr/bin/jq && \
chmod +x /usr/bin/jq && \
rm -f /tmp/jq-release.key && \
rm -f /tmp/jq-linux64.asc && \
rm -f /tmp/jq-linux64

RUN cargo install diesel_cli --no-default-features --features postgres

RUN git clone https://framagit.org/tricoteuses/tricoteuses-api-senat.git

WORKDIR tricoteuses-api-senat

EXPOSE 8004
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ services:
ports:
- 8003:8003

senat:
build:
context: ./_provisioning/senat-api
environment:
- ROCKET_ENV=staging
command: cargo run -p tricoteuses_api_senat -- -c Config.toml -v
volumes:
- ./_data/senat-data/:/senat-data/
ports:
- 8004:8004

volumes:
pgdata:
_dumps:
Expand Down

0 comments on commit b5679e6

Please sign in to comment.