Skip to content

Commit

Permalink
remove redundant Dockerfile for development (#2575)
Browse files Browse the repository at this point in the history
enhance docker-compose.yaml to use the same Dockerfile used for building the production image
  • Loading branch information
kelvin-muchiri authored Mar 26, 2024
1 parent 59ce53b commit 45283d6
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 139 deletions.
79 changes: 0 additions & 79 deletions Dockerfile

This file was deleted.

8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ services:
api:
build:
context: .
dockerfile: Dockerfile
dockerfile: ./docker/onadata-uwsgi/Dockerfile.ubuntu
target: runserver
depends_on:
- database
- cache
stdin_open: true
tty: true
user: "onadata"
volumes:
- ./:/srv/onadata
ports:
Expand All @@ -18,14 +18,14 @@ services:
celery:
build:
context: .
dockerfile: Dockerfile
dockerfile: ./docker/onadata-uwsgi/Dockerfile.ubuntu
target: runserver
depends_on:
- database
- cache
- api
volumes:
- ./:/srv/onadata
user: "onadata"
command: celery -A onadata.celeryapp worker -B -l INFO -E

database:
Expand Down
60 changes: 32 additions & 28 deletions docker/onadata-uwsgi/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN mkdir -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
# hadolint ignore=DL3013
RUN --mount=type=ssh if [ -n "$optional_packages" ]; then pip install ${optional_packages} ; fi

FROM ubuntu:focal-20240123
FROM ubuntu:focal-20240123 as base

ARG release_version=v3.18.2

Expand Down Expand Up @@ -48,31 +48,31 @@ RUN add-apt-repository ppa:deadsnakes/ppa -y && apt-get update -q

# Install OnaData Dependencies
RUN apt-get install -y --no-install-recommends \
libproj-dev \
gdal-bin \
memcached \
libmemcached-dev \
supervisor \
python3.10 \
python3.10-dev \
python3-pip \
python3-setuptools \
libssl-dev \
libpq-dev \
gfortran \
libatlas-base-dev \
libjpeg-dev \
libxml2-dev \
libxslt1-dev \
libpython3.10-dev \
zlib1g-dev \
ghostscript \
python3-celery \
python3-sphinx \
libtool \
openjdk-11-jre-headless \
libpcre3 \
libpcre3-dev \
libproj-dev \
gdal-bin \
memcached \
libmemcached-dev \
supervisor \
python3.10 \
python3.10-dev \
python3-pip \
python3-setuptools \
libssl-dev \
libpq-dev \
gfortran \
libatlas-base-dev \
libjpeg-dev \
libxml2-dev \
libxslt1-dev \
libpython3.10-dev \
zlib1g-dev \
ghostscript \
python3-celery \
python3-sphinx \
libtool \
openjdk-11-jre-headless \
libpcre3 \
libpcre3-dev \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
Expand Down Expand Up @@ -100,12 +100,16 @@ RUN python3.10 -m pip install --no-cache-dir -U pip && \
python3.10 -m pip install setuptools==65.5.1 && \
python3.10 -m pip install --no-cache-dir pyyaml uwsgitop


FROM base as docs
# Compile API Docs
RUN make -C docs html

FROM base as runserver

EXPOSE 8000

USER onadata

CMD ["/usr/local/bin/uwsgi", "--ini", "/uwsgi.ini"]

USER onadata

28 changes: 0 additions & 28 deletions docker/onadata-uwsgi/docker-compose.yml

This file was deleted.

0 comments on commit 45283d6

Please sign in to comment.