mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-12-26 19:40:24 +00:00
7c157aa487
* refactor(frappe-worker): Dockerfile * fix(frappe-worker): Cloning frappe repo * refactor(frappe-nginx): Dockerfile * refactor(erpnext-nginx): Dockerfile * chore(frappe-worker): Add space in Dockerfile * refactor(bench): Dockerfile * refactor(frappe-socketio): Dockerfile * ci(Test): Add `workflow_dispatch` trigger * fix(bench): Uncomment missing package * fix(bench): Replace legacy `libmariadbclient-dev` with `libmariadb-dev` * refactor(erpnext-nginx): Install script - Remove repetitive code - Don't explicitly install production deps (they are installed via plain `yarn` with dev deps) - Don't write to lockfiles * fix(erpnext-nginx): use -e flag, fix installation * fix(erpnext-nginx): Don't install unused wget * fix(frappe-nginx): Get newest certificates * fix: Install ca-certificates on erpnext-nginx instead of frappe-nginx * trigger ci * ci(test): Fix trigger duplicate * chore: Fix linting
36 lines
949 B
Docker
36 lines
949 B
Docker
FROM alpine/git as builder
|
|
|
|
ARG GIT_REPO=https://github.com/frappe/frappe.git
|
|
ARG GIT_BRANCH=develop
|
|
|
|
RUN git clone --depth 1 -b ${GIT_BRANCH} ${GIT_REPO} /opt/frappe
|
|
|
|
FROM node:bullseye-slim
|
|
|
|
# Add frappe user
|
|
RUN useradd -ms /bin/bash frappe
|
|
WORKDIR /home/frappe/frappe-bench
|
|
|
|
# Create bench directories and set ownership
|
|
RUN mkdir -p sites apps/frappe \
|
|
&& chown -R frappe:frappe /home/frappe
|
|
|
|
# Download socketio
|
|
COPY build/frappe-socketio/package.json apps/frappe
|
|
COPY --from=builder /opt/frappe/socketio.js apps/frappe/socketio.js
|
|
COPY --from=builder /opt/frappe/node_utils.js apps/frappe/node_utils.js
|
|
|
|
RUN cd apps/frappe \
|
|
&& npm install --only=prod
|
|
|
|
# Setup docker-entrypoint
|
|
COPY build/frappe-socketio/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
|
# backwards compat
|
|
RUN ln -s /usr/local/bin/docker-entrypoint.sh /
|
|
|
|
USER frappe
|
|
WORKDIR /home/frappe/frappe-bench/sites
|
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
CMD ["start"]
|