mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-21 17:15:38 +03:00
Allow for a wheel cache and include missing files in the build
This commit is contained in:
parent
d434ae3387
commit
48bc22f89d
3 changed files with 13 additions and 6 deletions
5
.dockerignore
Normal file
5
.dockerignore
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Dockerfile
|
||||||
|
.travis.yml
|
||||||
|
.gitignore
|
||||||
|
demo/etc
|
||||||
|
tox.ini
|
13
Dockerfile
13
Dockerfile
|
@ -2,15 +2,16 @@ FROM python:2-alpine
|
||||||
|
|
||||||
RUN apk add --no-cache --virtual .nacl_deps build-base libffi-dev zlib-dev openssl-dev libjpeg-turbo-dev linux-headers
|
RUN apk add --no-cache --virtual .nacl_deps build-base libffi-dev zlib-dev openssl-dev libjpeg-turbo-dev linux-headers
|
||||||
|
|
||||||
COPY synapse /usr/local/src/synapse
|
COPY . /synapse
|
||||||
COPY setup.py setup.cfg README.rst synctl /usr/local/src/
|
|
||||||
|
|
||||||
RUN cd /usr/local/src \
|
# A wheel cache may be provided in ./cache for faster build
|
||||||
&& pip install --upgrade --process-dependency-links . \
|
RUN cd /synapse \
|
||||||
|
&& pip install --upgrade pip setuptools \
|
||||||
|
&& mkdir -p /synapse/cache \
|
||||||
|
&& pip install -f /synapse/cache --upgrade --process-dependency-links . \
|
||||||
|
&& mv /synapse/contrib/docker/* / \
|
||||||
&& rm -rf setup.py setup.cfg synapse
|
&& rm -rf setup.py setup.cfg synapse
|
||||||
|
|
||||||
COPY contrib/docker /
|
|
||||||
|
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
|
|
||||||
ENTRYPOINT ["/start.py"]
|
ENTRYPOINT ["/start.py"]
|
||||||
|
|
|
@ -22,6 +22,7 @@ if mode == "generate":
|
||||||
# Parse the configuration file
|
# Parse the configuration file
|
||||||
if not os.path.exists("/compiled"):
|
if not os.path.exists("/compiled"):
|
||||||
os.mkdir("/compiled")
|
os.mkdir("/compiled")
|
||||||
|
|
||||||
convert("/conf/homeserver.yaml", "/compiled/homeserver.yaml")
|
convert("/conf/homeserver.yaml", "/compiled/homeserver.yaml")
|
||||||
convert("/conf/log.config", "/compiled/%s.log.config" % os.environ.get("SYNAPSE_SERVER_NAME"))
|
convert("/conf/log.config", "/compiled/%s.log.config" % os.environ.get("SYNAPSE_SERVER_NAME"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue