-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.pkg
More file actions
95 lines (84 loc) · 4.3 KB
/
Copy pathContainerfile.pkg
File metadata and controls
95 lines (84 loc) · 4.3 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# --------------------------------------------------------------------------
# THIS FILE IS AUTOGENERATED - DO NOT EDIT MANUALLY
#
# Source: Containerfile.pkg.j2
# --------------------------------------------------------------------------
ARG BASE_VERSION=15
FROM ghcr.io/daemonless/nginx-base:${BASE_VERSION}
ARG FREEBSD_ARCH=amd64
ARG PKG_NAME="onlyoffice-documentserver"
# rabbitmq explicit: DS 9.4.0 dropped it as a dep; converter still needs the broker
ARG PACKAGES="${PKG_NAME} rabbitmq postgresql18-client node22 npm-node22"
ARG UPSTREAM_URL="https://api.github.com/repos/ONLYOFFICE/DocumentServer/releases/latest"
ARG UPSTREAM_JQ='.tag_name | ltrimstr("v")'
# --- Metadata (Injected by Generator) ---
LABEL org.opencontainers.image.title="ONLYOFFICE Document Server" \
org.opencontainers.image.description="Online office suite providing collaborative editors for documents, spreadsheets, and presentations. Fully compatible with Office Open XML formats (.docx, .xlsx, .pptx). Requires PostgreSQL — see the onlyoffice-postgresql service below." \
org.opencontainers.image.source="https://github.com/daemonless/onlyoffice" \
org.opencontainers.image.url="https://www.onlyoffice.com/" \
org.opencontainers.image.documentation="https://helpcenter.onlyoffice.com/" \
org.opencontainers.image.licenses="AGPL-3.0" \
org.opencontainers.image.vendor="daemonless" \
org.opencontainers.image.authors="daemonless" \
io.daemonless.category="Productivity" \
io.daemonless.volumes="/config" \
io.daemonless.arch="${FREEBSD_ARCH}" \
io.daemonless.pkg-source="pkg" \
io.daemonless.upstream-url="${UPSTREAM_URL}" \
io.daemonless.upstream-jq="${UPSTREAM_JQ}" \
io.daemonless.packages="${PACKAGES}"
# Install onlyoffice-documentserver and all dependencies
RUN pkg update && \
pkg install -y ${PACKAGES} && \
mkdir -p /app && \
pkg query '%v' ${PKG_NAME} > /app/version && \
pkg clean -ay && \
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*
# Create persistent config directory (owned by bsd/UID 1000, daemonless convention)
RUN mkdir -p /config/data /config/logs /config/fonts /config/cache && \
chown -R bsd:bsd /config
# Install ONLYOFFICE document-server-integration example app
RUN mkdir -p /usr/local/www/onlyoffice/example && \
fetch -qo /tmp/ds-example.tar.gz \
https://github.com/ONLYOFFICE/document-server-integration/archive/refs/heads/master.tar.gz && \
tar -xzf /tmp/ds-example.tar.gz \
--strip-components=4 \
-C /usr/local/www/onlyoffice/example \
document-server-integration-master/web/documentserver-example/nodejs && \
cd /usr/local/www/onlyoffice/example && \
npm install --omit=dev && \
npm install ejs && \
npm cache clean --force && \
rm /tmp/ds-example.tar.gz && \
mkdir -p /usr/local/www/onlyoffice/example/files && \
chown -R bsd:bsd /usr/local/www/onlyoffice/example && \
mkdir -p /usr/local/www/onlyoffice/example/public/assets/document-formats && \
ln -sf /usr/local/www/onlyoffice/documentserver/document-formats/onlyoffice-docs-formats.json \
/usr/local/www/onlyoffice/example/public/assets/document-formats/onlyoffice-docs-formats.json && \
rm -rf /usr/local/www/onlyoffice/example/public/assets/document-templates && \
ln -sf /usr/local/www/onlyoffice/documentserver/document-templates \
/usr/local/www/onlyoffice/example/public/assets/document-templates && \
for ext in docx xlsx pptx pdf; do \
ln -sf /usr/local/www/onlyoffice/documentserver/document-templates/new/en-US/new.$ext \
/usr/local/www/onlyoffice/example/public/assets/document-templates/new/new.$ext; \
done
# Copy service definitions and init scripts
COPY root/ /
# Make scripts executable
RUN chmod +x /etc/cont-init.d/* /etc/services.d/*/run /healthz 2>/dev/null || true
# Environment (compatible with upstream onlyoffice/documentserver)
ENV DB_HOST=onlyoffice-postgresql \
DB_PORT=5432 \
DB_NAME=onlyoffice \
DB_USER=onlyoffice \
DB_PWD=onlyoffice \
AMQP_URI=amqp://guest:guest@localhost \
JWT_ENABLED=false \
JWT_SECRET=secret \
JWT_HEADER=Authorization \
JWT_IN_BODY=false \
WOPI_ENABLED=false \
EXAMPLE_SERVER_URL=localhost
# --- Expose (Injected by Generator) ---
# --- Volumes (Injected by Generator) ---
VOLUME /config