To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 1da76a81 authored by Sandro Lutz's avatar Sandro Lutz Committed by Luzian Bieri
Browse files

Add Dockerfile.development for local development using Docker

parent 518d0a6b
Pipeline #68321 failed with stages
in 13 minutes and 22 seconds
FROM node:13.8
WORKDIR /app
# Copy dependency list
ADD ./package.json /app/
ADD ./package-lock.json /app/
# Install dependencies
RUN npm install -g gatsby-cli
RUN npm install
# Clean up app directory
RUN rm /app/package.json /app/package-lock.json
VOLUME [ "/app" ]
EXPOSE 8000
CMD [ "gatsby", "develop", "--host=0.0.0.0" ]
......@@ -18,7 +18,23 @@ This is the home of the amiv website.
You can visit the website now at http://localhost:8000
2. **Linting & Formatting**
2. **Development with Docker**
You can run the development server completely with docker.
Build local development image
```shell
docker build -t amiv-website-local-dev -f Dockerfile.development .
```
Run development server with
```shell
docker run --rm -it -p 8000:8000 -v ${PWD}:/app amiv-website-local-dev
```
3. **Linting & Formatting**
We use `eslint` and `prettier` for linting and formatting of the javascript code. You can use the following commands:
......@@ -27,7 +43,7 @@ This is the home of the amiv website.
npm run format
```
3. **Production Build**
4. **Production Build**
You can prepare a production build manually and serve it using gatsby's built-in webserver. This will run the server-side rendering part.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment