File tree 4 files changed +36
-139
lines changed
4 files changed +36
-139
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ services:
2
2
api :
3
3
build :
4
4
context : .
5
- dockerfile : Dockerfile
5
+ dockerfile : ./docker/onadata-uwsgi/Dockerfile.ubuntu
6
+ target : runserver
6
7
depends_on :
7
8
- database
8
9
- cache
9
10
stdin_open : true
10
11
tty : true
11
- user : " onadata"
12
12
volumes :
13
13
- ./:/srv/onadata
14
14
ports :
@@ -18,14 +18,14 @@ services:
18
18
celery :
19
19
build :
20
20
context : .
21
- dockerfile : Dockerfile
21
+ dockerfile : ./docker/onadata-uwsgi/Dockerfile.ubuntu
22
+ target : runserver
22
23
depends_on :
23
24
- database
24
25
- cache
25
26
- api
26
27
volumes :
27
28
- ./:/srv/onadata
28
- user : " onadata"
29
29
command : celery -A onadata.celeryapp worker -B -l INFO -E
30
30
31
31
database :
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ RUN mkdir -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
13
13
# hadolint ignore=DL3013
14
14
RUN --mount=type=ssh if [ -n "$optional_packages" ]; then pip install ${optional_packages} ; fi
15
15
16
- FROM ubuntu:focal-20240123
16
+ FROM ubuntu:focal-20240123 as base
17
17
18
18
ARG release_version=v3.18.2
19
19
@@ -48,31 +48,31 @@ RUN add-apt-repository ppa:deadsnakes/ppa -y && apt-get update -q
48
48
49
49
# Install OnaData Dependencies
50
50
RUN apt-get install -y --no-install-recommends \
51
- libproj-dev \
52
- gdal-bin \
53
- memcached \
54
- libmemcached-dev \
55
- supervisor \
56
- python3.10 \
57
- python3.10-dev \
58
- python3-pip \
59
- python3-setuptools \
60
- libssl-dev \
61
- libpq-dev \
62
- gfortran \
63
- libatlas-base-dev \
64
- libjpeg-dev \
65
- libxml2-dev \
66
- libxslt1-dev \
67
- libpython3.10-dev \
68
- zlib1g-dev \
69
- ghostscript \
70
- python3-celery \
71
- python3-sphinx \
72
- libtool \
73
- openjdk-11-jre-headless \
74
- libpcre3 \
75
- libpcre3-dev \
51
+ libproj-dev \
52
+ gdal-bin \
53
+ memcached \
54
+ libmemcached-dev \
55
+ supervisor \
56
+ python3.10 \
57
+ python3.10-dev \
58
+ python3-pip \
59
+ python3-setuptools \
60
+ libssl-dev \
61
+ libpq-dev \
62
+ gfortran \
63
+ libatlas-base-dev \
64
+ libjpeg-dev \
65
+ libxml2-dev \
66
+ libxslt1-dev \
67
+ libpython3.10-dev \
68
+ zlib1g-dev \
69
+ ghostscript \
70
+ python3-celery \
71
+ python3-sphinx \
72
+ libtool \
73
+ openjdk-11-jre-headless \
74
+ libpcre3 \
75
+ libpcre3-dev \
76
76
&& apt-get autoremove -y \
77
77
&& apt-get clean -y \
78
78
&& rm -rf /var/lib/apt/lists/*
@@ -100,12 +100,16 @@ RUN python3.10 -m pip install --no-cache-dir -U pip && \
100
100
python3.10 -m pip install setuptools==65.5.1 && \
101
101
python3.10 -m pip install --no-cache-dir pyyaml uwsgitop
102
102
103
-
103
+ FROM base as docs
104
104
# Compile API Docs
105
105
RUN make -C docs html
106
106
107
+ FROM base as runserver
108
+
107
109
EXPOSE 8000
108
110
111
+ USER onadata
112
+
109
113
CMD ["/usr/local/bin/uwsgi", "--ini", "/uwsgi.ini"]
110
114
111
- USER onadata
115
+
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments