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

Align install method #495

Merged
merged 6 commits into from
May 30, 2020
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
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ jobs:
- checkout
- restore_cache:
keys:
- server3-{{ checksum "server/Pipfile.lock" }}-{{ checksum "server/Dockerfile" }}
- server3-{{ checksum "Pipfile.lock" }}-{{ checksum "comrade/Dockerfile" }}
- run:
name: Load Docker image layer cache
command: test -f caches/server.tar && (docker load -i caches/server.tar) || echo 'Cache not found'
- run:
name: Build application Docker image
command: docker build --tag server:latest -f server/Dockerfile .
command: docker build --tag server:latest -f comrade/Dockerfile .
- run:
name: flake8
command: docker run -it server pipenv run flake8 --max-line-length=1000
Expand All @@ -84,18 +84,18 @@ jobs:
- checkout
- restore_cache:
keys:
- server3-{{ checksum "server/Pipfile.lock" }}-{{ checksum "server/Dockerfile" }}
- server3-{{ checksum "Pipfile.lock" }}-{{ checksum "comrade/Dockerfile" }}
- run:
name: Load Docker image layer cache
command: test -f caches/server.tar && (docker load -i caches/server.tar) || echo 'Cache not found'
- run:
name: Save Docker image layer cache
command: |
mkdir -p caches/
docker build --tag server -f server/Dockerfile .
docker build --tag server -f comrade/Dockerfile .
docker save $(docker history -q server | grep -v '^<missing>$') -o caches/server.tar
- save_cache:
key: server3-{{ checksum "server/Pipfile.lock" }}-{{ checksum "server/Dockerfile" }}
key: server3-{{ checksum "Pipfile.lock" }}-{{ checksum "comrade/Dockerfile" }}
paths:
- caches/
pytest:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions server/Dockerfile → comrade/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.7.7-slim@sha256:56de27efa2d88b47bede6d075a60a70aed76c43a8ee0bbbaa39c8f445a4459fe
WORKDIR /app
COPY setup.py MANIFEST.in server/Pipfile* ./
COPY setup.py MANIFEST.in Pipfile* ./
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc python-dev g++ make libffi-dev libssl-dev &&\
mkdir /app/comrade && \
Expand All @@ -11,6 +11,6 @@ RUN apt-get update && \
find /root/.local/ -type d -name __pycache__ | xargs rm -rf && \
rm -rf ~/.cache /var/cache && \
rm -rf /var/lib/apt/lists/*
COPY server/ /app/comrade/
COPY comrade/ /app/comrade/
EXPOSE 8000
CMD pipenv run comrade
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.