-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.acceptance
More file actions
76 lines (60 loc) · 1.94 KB
/
Copy pathDockerfile.acceptance
File metadata and controls
76 lines (60 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# syntax=docker/dockerfile:1.9
ARG KC_VERSION=latest
FROM ghcr.io/kitconcept/core-builder:${KC_VERSION} AS builder
# Install dependencies
RUN --mount=type=cache,target=/root/.cache \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync \
--locked \
--no-dev \
--no-group test \
--group container \
--no-install-project
COPY . /src
WORKDIR /src
RUN <<EOT
ls -la /src/src/kitconcept/intranet/behaviors
EOT
# Install package
RUN --mount=type=cache,target=/root/.cache \
uv sync \
--locked \
--no-dev \
--group test \
--group container \
--no-editable
# Move skeleton files to /app
ENV SITE_DEFAULT_LANGUAGE=en
RUN <<EOT
mv /app_skeleton/* /app
mv scripts/create_site.py /app/scripts/create_site.py
mv scripts/default.json /app/scripts/default.json
EOT
# Compile translation files
RUN <<EOT
/app/bin/python /compile_mo.py
EOT
FROM ghcr.io/kitconcept/core-prod:${KC_VERSION:-latest}
LABEL maintainer="kitconcept GmbH <info@kitconcept.com>" \
org.label-schema.name="kitconcept.intranet-acceptance" \
org.label-schema.description="kitconcept Intranet backend acceptance image." \
org.label-schema.vendor="kitconcept GmbH"
ENV CONFIGURE_PACKAGES="plone.restapi,plone.volto,plone.volto.cors,kitconcept.intranet"
ENV APPLY_PROFILES="kitconcept.intranet:default"
ENV ALLOWED_DISTRIBUTIONS=kitconcept-intranet
# Copy the pre-built `/app` directory to the runtime container
# and change the ownership to user app and group app in one step.
COPY --from=builder --chown=500:500 /app /app
RUN <<EOT
ln -s /data /app/var
chown -R 500:500 /data
EOT
# Also expose port 55001
EXPOSE 55001
ENV ZSERVER_HOST=0.0.0.0
ENV ZSERVER_PORT=55001
ENV LISTEN_PORT=55001
# Entrypoint is robot-server
ENTRYPOINT [ "/app/bin/robot-server" ]
CMD ["kitconcept.intranet.testing.ROBOT_TESTING"]