Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/hatvp api #2

Merged
merged 3 commits into from
Aug 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ 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
hatvp-data-fetcher:
docker-compose run hatvp cargo run -p tricoteuses_api_hatvp_fetcher -- -c Config.toml -v
27 changes: 27 additions & 0 deletions _provisioning/hatvp-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM rustlang/rust:nightly

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

RUN apt-get update && \
apt-get install -y unzip libxml2-utils

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 git clone https://framagit.org/tricoteuses/tricoteuses-api-hatvp.git

WORKDIR tricoteuses-api-hatvp

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

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

volumes:
pgdata:
_dumps:
Expand Down