Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:16 as build

WORKDIR /build
COPY ./ /build

RUN yarn install
RUN yarn build

FROM nginx:alpine
COPY --from=build /build/public /usr/share/nginx/html
# RUN rm /etc/nginx/conf.d/default.conf
# COPY ./nginx.conf /etc/nginx/conf.d


EXPOSE 80
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,18 @@ None at the moment.

This project contains static assets that run standalone in the browser. You don't need a server, unless you want to host the assets yourself.

# using docker

```
git clone https://github.com/dabbott/javascript-playgrounds.git
cd javascript-playgrounds
docker-compose build

docker-compose up -d
```

and make any changes you need for your personal setup

### unpkg

The recommended host is https://unpkg.com, which is a CDN that serves content from the npm registry. The examples in this README all point to:
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '3.3'

services:
javascript-playgrounds:
build: .
ports:
- 1337:80