mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
docker: widen build context to repo root for build-time install stage
The Dockerfile will need access to chatmaild/ and cmdeploy/ source trees to run CMDEPLOY_STAGES=install via pyinfra during image build, moving install-time work out of container startup. The previous context (./docker) only included helper scripts. Also adds .dockerignore to exclude .git, data/, venv/ etc. from the build context, and updates COPY paths accordingly.
This commit is contained in:
7
.dockerignore
Normal file
7
.dockerignore
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.git
|
||||||
|
data/
|
||||||
|
venv/
|
||||||
|
__pycache__
|
||||||
|
*.pyc
|
||||||
|
*.orig
|
||||||
|
.pytest_cache
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
services:
|
services:
|
||||||
chatmail:
|
chatmail:
|
||||||
build:
|
build:
|
||||||
context: ./docker
|
context: ./
|
||||||
dockerfile: chatmail_relay.dockerfile
|
dockerfile: docker/chatmail_relay.dockerfile
|
||||||
tags:
|
tags:
|
||||||
- chatmail-relay:latest
|
- chatmail-relay:latest
|
||||||
image: chatmail-relay:latest
|
image: chatmail-relay:latest
|
||||||
|
|||||||
@@ -55,12 +55,12 @@ RUN apt-get update && \
|
|||||||
WORKDIR /opt/chatmail
|
WORKDIR /opt/chatmail
|
||||||
|
|
||||||
ARG SETUP_CHATMAIL_SERVICE_PATH=/lib/systemd/system/setup_chatmail.service
|
ARG SETUP_CHATMAIL_SERVICE_PATH=/lib/systemd/system/setup_chatmail.service
|
||||||
COPY ./files/setup_chatmail.service "$SETUP_CHATMAIL_SERVICE_PATH"
|
COPY ./docker/files/setup_chatmail.service "$SETUP_CHATMAIL_SERVICE_PATH"
|
||||||
RUN ln -sf "$SETUP_CHATMAIL_SERVICE_PATH" "/etc/systemd/system/multi-user.target.wants/setup_chatmail.service"
|
RUN ln -sf "$SETUP_CHATMAIL_SERVICE_PATH" "/etc/systemd/system/multi-user.target.wants/setup_chatmail.service"
|
||||||
|
|
||||||
COPY --chmod=555 ./files/setup_chatmail_docker.sh /setup_chatmail_docker.sh
|
COPY --chmod=555 ./docker/files/setup_chatmail_docker.sh /setup_chatmail_docker.sh
|
||||||
COPY --chmod=555 ./files/update_ini.sh /update_ini.sh
|
COPY --chmod=555 ./docker/files/update_ini.sh /update_ini.sh
|
||||||
COPY --chmod=555 ./files/entrypoint.sh /entrypoint.sh
|
COPY --chmod=555 ./docker/files/entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
## TODO: add git clone.
|
## TODO: add git clone.
|
||||||
## Problem: how correct save only required files inside container....
|
## Problem: how correct save only required files inside container....
|
||||||
|
|||||||
Reference in New Issue
Block a user