2023-05-08 10:16:18 +00:00
|
|
|
FROM node:20.1.0-alpine
|
2023-02-03 10:26:06 +00:00
|
|
|
|
|
|
|
ENV NODE_ENV production
|
|
|
|
|
2023-02-06 12:35:58 +00:00
|
|
|
RUN apk add --update --no-cache \
|
|
|
|
openssl \
|
|
|
|
curl \
|
|
|
|
bash \
|
|
|
|
py3-pip
|
2023-02-03 10:26:06 +00:00
|
|
|
|
|
|
|
RUN pip install --no-cache-dir --upgrade supervisor
|
|
|
|
|
|
|
|
RUN mkdir -p /var/lib/server/logs
|
|
|
|
|
|
|
|
COPY docker/supervisord.conf /etc/supervisord.conf
|
|
|
|
|
|
|
|
COPY docker/docker-entrypoint.sh /usr/local/bin/
|
|
|
|
|
|
|
|
COPY . /opt/server
|
|
|
|
|
|
|
|
WORKDIR /opt/server
|
|
|
|
|
2023-02-06 12:35:58 +00:00
|
|
|
RUN corepack enable
|
|
|
|
|
2023-02-03 10:26:06 +00:00
|
|
|
RUN yarn install --immutable
|
|
|
|
|
2023-02-06 14:08:03 +00:00
|
|
|
RUN CI=true yarn build
|
2023-02-03 10:26:06 +00:00
|
|
|
|
2023-02-09 09:23:10 +00:00
|
|
|
RUN mkdir -p \
|
|
|
|
/opt/bundled/syncing-server \
|
|
|
|
/opt/bundled/auth \
|
|
|
|
/opt/bundled/files \
|
|
|
|
/opt/bundled/revisions \
|
2023-02-16 14:17:00 +00:00
|
|
|
/opt/bundled/api-gateway \
|
|
|
|
/opt/shared/uploads
|
2023-02-09 09:23:10 +00:00
|
|
|
|
|
|
|
RUN yarn workspace @standardnotes/syncing-server bundle --no-compress --output-directory /opt/bundled/syncing-server
|
|
|
|
RUN yarn workspace @standardnotes/auth-server bundle --no-compress --output-directory /opt/bundled/auth
|
|
|
|
RUN yarn workspace @standardnotes/files-server bundle --no-compress --output-directory /opt/bundled/files
|
|
|
|
RUN yarn workspace @standardnotes/revisions-server bundle --no-compress --output-directory /opt/bundled/revisions
|
|
|
|
RUN yarn workspace @standardnotes/api-gateway bundle --no-compress --output-directory /opt/bundled/api-gateway
|
|
|
|
|
2023-02-10 11:58:20 +00:00
|
|
|
WORKDIR /opt/bundled
|
|
|
|
|
|
|
|
RUN rm -rf /opt/server
|
|
|
|
|
2023-02-06 14:08:03 +00:00
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|