You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't run Ruby 2.7.x on my machine anymore. Docker was the only
solution I found. It may help others getting started to contribute
to this website as well.
The setup is basically copied from that of `scala-lang.org`, but
with an additional setup of Node.js.
Copy file name to clipboardExpand all lines: README.md
+33-3Lines changed: 33 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,35 @@ The key to contributing is being able to edit and
12
12
preview your content. [Your pull requests are welcome](https://github.com/scala-js/scala-js-website/compare)!
13
13
14
14
## Set up
15
+
16
+
### With Docker
17
+
18
+
You need to have [Docker Engine](https://docs.docker.com/engine/) and [Docker Compose](https://docs.docker.com/compose/) installed on your machine.
19
+
Under Mac OS (Intel or Apple silicon), instead of installing [Docker Desktop](https://docs.docker.com/desktop/) you can also use [HomeBrew](https://brew.sh/) with [Colima](https://github.com/abiosoft/colima): `brew install colima docker docker-compose`.
20
+
UID and GID environment variables are needed to avoid docker from writing files as root in your directory.
21
+
22
+
```
23
+
env UID="$(id -u)" GID="$(id -g)" docker-compose up
24
+
```
25
+
26
+
On Linux you may have to prefix that command with `sudo`, depending on your Docker setup.
27
+
28
+
The generated site is available at `http://localhost:4000`.
29
+
30
+
When the website dependencies change (the content of the `Gemfile`), you have to re-build the Docker image:
31
+
32
+
```
33
+
env UID="$(id -u)" GID="$(id -g)" docker-compose up --build
34
+
```
35
+
36
+
If you have problems with the Docker image or want to force the rebuild of the Docker image:
0 commit comments