File tree Expand file tree Collapse file tree 5 files changed +75
-0
lines changed Expand file tree Collapse file tree 5 files changed +75
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM ubuntu:focal
2
+
3
+ ENV PYTHONUNBUFFERED 1
4
+ ENV LC_ALL=C.UTF-8
5
+ ARG DEBIAN_FRONTEND=noninteractive
6
+
7
+ # the base image is also built using this Dockerfile, so we have to reset this
8
+ USER root
9
+
10
+ RUN apt-get -y update && apt-get -y --no-install-recommends install \
11
+ build-essential \
12
+ gcc \
13
+ gettext \
14
+ python3-dev \
15
+ python3-venv \
16
+ && \
17
+ apt-get clean && \
18
+ rm -rf /var/lib/apt/lists/* /usr/share/doc/* /usr/share/locale/* /usr/share/man/* && \
19
+ mkdir -p /app && \
20
+ (useradd -m app || true)
21
+
22
+ COPY --from=library/docker:latest /usr/local/bin/docker /usr/bin/docker
23
+ COPY --from=docker/compose:1.23.2 /usr/local/bin/docker-compose /usr/bin/docker-compose
24
+
25
+ WORKDIR /app
26
+
27
+ ADD runtests/requirements.txt /app/
28
+
29
+ USER app
30
+
31
+ ENV PATH /home/app/venv/bin:${PATH}
32
+
33
+ RUN python3 -m venv ~/venv && \
34
+ pip install -r /app/requirements.txt
35
+
36
+ ENV DJANGO_SETTINGS_MODULE settings
37
+
38
+ # *WARNING*: DO NOT "ADD . /app" because it would include the current settings in the base image, which is uploaded by
39
+ # CI to docker hub; Since the settings currently include secrets, this would leak our credentials!
40
+
41
+ EXPOSE 8000
42
+
43
+ ENTRYPOINT ["/app/manage.py" ]
Original file line number Diff line number Diff line change
1
+ version : " 3.5"
2
+
3
+ services :
4
+ django :
5
+ build : .
6
+ user : app
7
+ command : " runserver 0:8000"
8
+ volumes :
9
+ - ./runtests:/app:cached
10
+ - ./actstream:/app/actstream:cached
11
+ - /var/run/docker.sock:/var/run/docker.sock
12
+ environment :
13
+ IPYTHONDIR : /app/.ipython
14
+ HISTFILE : /app/.bash_history
15
+ PYTHONDONTWRITEBYTECODE : " x"
16
+ PYTHONWARNINGS : default
17
+ restart : unless-stopped
Original file line number Diff line number Diff line change
1
+ Developing on django-activity-stream
2
+ ====================================
3
+
4
+ To simplify the development workflow, the project provides a docker container that can run the tests.
5
+
6
+ You will need `docker <https://www.docker.com/ >`_ and `Docker Compose <https://docs.docker.com/compose/ >`_.
7
+
8
+ .. code-block :: bash
9
+
10
+ docker-compose run --rm django test
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ Contents:
36
36
streams
37
37
templatetags
38
38
feeds
39
+ development
39
40
changelog
40
41
api
41
42
Original file line number Diff line number Diff line change
1
+ Django >= 2.2.17
2
+ django-jsonfield
3
+ django-jsonfield-compat
4
+ tblib
You can’t perform that action at this time.
0 commit comments