Skip to content

Commit

Permalink
Update docker compose files
Browse files Browse the repository at this point in the history
  • Loading branch information
Uxio0 committed Oct 10, 2022
1 parent e86acc4 commit 4eb2d25
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
command: docker/web/celery/worker/run.sh

ganache:
image: trufflesuite/ganache-cli
command: -d --defaultBalanceEther 10000 --gasLimit 10000000 -a 30 --chain.chainId 1337 --chain.networkId 1337
image: trufflesuite/ganache:latest
command: --defaultBalanceEther 10000 --gasLimit 10000000 -a 30 --chain.chainId 1337 --chain.networkId 1337 -d
ports:
- "8545:8545"
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ volumes:

services:
nginx:
image: nginx:1.21-alpine
image: nginx:1-alpine
hostname: nginx
ports:
- "8000:8000"
Expand All @@ -16,7 +16,7 @@ services:
- web

redis:
image: redis:5-alpine
image: redis:7-alpine
ports:
- "6379:6379"

Expand Down
21 changes: 10 additions & 11 deletions docker/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
FROM python:3.10-slim

ENV PYTHONUNBUFFERED 1
WORKDIR /app
ARG APP_HOME=/app
WORKDIR ${APP_HOME}
ENV PYTHONUNBUFFERED=1

# Signal handling for PID1 https://github.com/krallin/tini
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
# https://eth-hash.readthedocs.io/en/latest/quickstart.html#specify-backend-by-environment-variable
# `pysha3` is way faster than `pycryptodome` for CPython
ENV ETH_HASH_BACKEND=pysha3

COPY requirements.txt ./
RUN set -ex \
&& buildDeps=" \
build-essential \
git \
libssl-dev \
libgmp-dev \
pkg-config \
libpq-dev \
" \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& apt-get install -y --no-install-recommends $buildDeps tmux postgresql-client \
&& pip install -U --no-cache-dir wheel setuptools pip \
&& pip install --no-cache-dir -r requirements.txt \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
Expand All @@ -28,5 +29,3 @@ RUN set -ex \

COPY . .
RUN DJANGO_SETTINGS_MODULE=config.settings.local DJANGO_DOT_ENV_FILE=.env.local python manage.py collectstatic --noinput

ENTRYPOINT ["/tini", "--"]

0 comments on commit 4eb2d25

Please sign in to comment.