Skip to content
Snippets Groups Projects
Commit dfc37a3a authored by Joni Korhonen's avatar Joni Korhonen
Browse files

add docker-compose

parent 0e7304af
No related branches found
No related tags found
No related merge requests found
FROM node:12.16.1
FROM node:erbium-alpine
WORKDIR /usr/app
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
RUN npm install \
&& chown -R node:node node_modules \
&& chmod -R o+rw node_modules
EXPOSE 3333
ENV DOCS_LOCATION=/usr/src/app/tempdocuments
COPY . .
ARG COMMAND
USER node
ENTRYPOINT [ "npm", "run" ]
CMD [ "start" ]
version: "3"
services:
huds:
image: helsinkifi/huds
build: .
container_name: huds
ports:
- "3333:3333"
volumes:
- ./src:/usr/app/src
- ./dist:/usr/app/dist
- ./www:/usr/app/www
- ./stencil.config.ts:/usr/app/stencil.config.ts
- ./tailwind.config.js:/usr/app/tailwind.config.js
- ./tsconfig.json:/usr/app/tsconfig.json
- ./watchdocs.js:/usr/app/watchdocs.js
......@@ -54,6 +54,14 @@ NOTE: Even when you have the documentation files in Vuepress, you'll need to man
If you don't want or cannot install node and other dependencies, you can run the development setup locally in a container like this:
`docker-compose up`
Image can be rebuilt with `docker-compose build` if needed for example after a node package was added.
CAVEAT: This doesn't solve running libraty with Vuepress and that use case requires vanilla docker way of running.
### Vanilla docker way
First build the container
`docker build -t helsinkifi/huds .`
......@@ -68,6 +76,3 @@ For example:
`docker run -v ${PWD}:/usr/src/app -p 3333:3333 helsinkifi/huds build`
TODO:
It's pretty annoying to copy paste long docker commands, so perhaps docker-compose would fit here. Anyone?
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment