Replies: 3 comments 13 replies
-
Thanks for the suggestion.
It is not inappropriate to include it in the code, however, we don't yet want to pre-commit to a particular way of using the web app with Docker. This is because
So for now, I'm not fully sure if we want to add this Dockerfile to the web code. Maybe this is the correct approach, but still want to mull a bit more over this before adding something (and then later trying to take it out).
Feel free! That is maybe the best option now, it can help other people too. You can add your guide in a new file under https://github.com/ente-io/ente/tree/main/docs/docs/self-hosting/guides (+add an entry in sidebar.ts), and once published it'll appear in https://help.ente.io/self-hosting/guides/.
rather, thank you 😊 |
Beta Was this translation helpful? Give feedback.
-
This does not seem to work for me, the build exits with an error:
Any hints? |
Beta Was this translation helpful? Give feedback.
-
I liked this Dockerfile and wanted to make it so it automatically updated itself from the git repo. This is what I came up with, hopefully others find it useful: Dockerfile FROM node:20-alpine
RUN apk add --no-cache git
WORKDIR /app
RUN npm install -g serve
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["serve", "-s", "/data/ente/web/apps/photos/out", "-l", "tcp://0.0.0.0:3000"]
EXPOSE 3000 entrypoint.sh #!/bin/sh
# Exit on any error
set -e
# Clone the repository
if [ ! -d "/data/ente/.git" ]; then
git clone https://github.com/ente-io/ente.git /data/ente
cd /data/ente/web
git submodule update --init --recursive
else
cd /data/ente
git pull
cd /data/ente/web
git submodule update --recursive
fi
# Install dependencies
yarn install
# Build the application
if [ -d "/data/ente/web/apps/photos/out" ]; then
echo "Removing previous build directory."
rm -rf /data/ente/web/apps/photos/out
fi
yarn build:photos
# Execute the command provided as arguments to the entrypoint (if any)
exec "$@" compose.yml services:
app:
container_name: ente-photos
environment:
NEXT_PUBLIC_ENTE_ENDPOINT: "https://foo.bar"
NEXT_PUBLIC_ALBUMS_ENDPOINT: "https://foo.bar"
build: .
volumes:
- ./data:/data
ports:
- "3000:3000"
restart: always |
Beta Was this translation helpful? Give feedback.
-
Hi there.
Recently ente became open source and I'm looking for a way to deploy all ente apps at once using docker-compose.
I've written the following code and am using it to deploy the web version with docker as well.
(This dockerfile is for photo.)
How about adding a dockerfile like this to the web folder and making it easier for many users to use the web in docker-compose?
If you think it's inappropriate to include it in the code, I'll write documentation about it so people can build web manually.
Thank you for taking the time to read my discussion.
Beta Was this translation helpful? Give feedback.
All reactions