mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
1.3 KiB
1.3 KiB
Warning
Usage of docker is a third-party contribution and not actively tested, used or supported by the main developer(s).
Having said that, you can also use Docker to create a local dev environment or a production deployment.
Dev environment
In this repository, create a Docker image:
docker build -t hydrogen-dev -f Dockerfile-dev .
Then start up a container from that image:
docker run \
--name hydrogen-dev \
--publish 3000:3000 \
--volume "$PWD":/code \
--interactive \
--tty \
--rm \
hydrogen-dev
Then point your browser to http://localhost:3000
. You can see the server logs in the terminal where you started the container.
To stop the container, simply hit ctrl+c
.
Production deployment
Build or pull image
In this repository, create a Docker image:
# Enable BuildKit https://docs.docker.com/develop/develop-images/build_enhancements/
export DOCKER_BUILDKIT=1
docker build -t hydrogen .
Or, pull the Docker image the GitHub Container Registry:
docker pull ghcr.io/vector-im/hydrogen
docker tag ghcr.io/vector-im/hydrogen hydrogen
Start container image
Then, start up a container from that image:
docker run \
--name hydrogen \
--publish 8080:80 \
hydrogen