Skip to content

Commit

Permalink
Merge pull request #61 from jakowenko/beta
Browse files Browse the repository at this point in the history
v0.9.0
  • Loading branch information
jakowenko authored Jul 21, 2021
2 parents dc2b373 + 374e4d9 commit e73e3fb
Show file tree
Hide file tree
Showing 54 changed files with 2,020 additions and 1,380 deletions.
29 changes: 29 additions & 0 deletions .develop/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM node:14-alpine
RUN apk --update add --no-cache bash python make g++ libpng libpng-dev jpeg-dev pango-dev cairo-dev giflib-dev libheif-dev
RUN apk add libimagequant-dev --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
RUN apk add vips-dev --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community

WORKDIR /double-take/api
COPY /api/package.json .
RUN npm install --production

WORKDIR /double-take/frontend
COPY /frontend/package.json .
RUN npm install

WORKDIR /double-take/api
COPY /api/server.js .
COPY /api/src ./src

WORKDIR /double-take/frontend
COPY /frontend/src ./src
COPY /frontend/public ./public
COPY /frontend/.env.production ./frontend/vue.config.js ./

WORKDIR /
RUN mkdir /.storage
RUN ln -s /.storage /double-take/.storage

WORKDIR /double-take

RUN npm install nodemon -g
5 changes: 5 additions & 0 deletions .develop/entrypoint.dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

mkdir -p ./.storage/config
[ -f ./.storage/config/config.yml ] || echo $'# Double Take' > ./.storage/config/config.yml
exec npm run api
2 changes: 2 additions & 0 deletions .develop/mosquitto.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
listener 1883
allow_anonymous true
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*

!entrypoint.sh
!frontend/*
!api/*

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.DS_Store
node_modules
docker-compose.yml

# frontend
frontend/dist
Expand Down
19 changes: 10 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ RUN apk add libimagequant-dev --repository=http://dl-cdn.alpinelinux.org/alpine/
RUN apk add vips-dev --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community

WORKDIR /double-take/api
COPY ./api/package.json .
COPY /api/package.json .
RUN npm install --production

WORKDIR /double-take/frontend
COPY ./frontend/package.json .
COPY /frontend/package.json .
RUN npm install

WORKDIR /double-take/api
COPY ./api/server.js .
COPY ./api/src ./src
COPY /api/server.js .
COPY /api/src ./src

WORKDIR /double-take/frontend
COPY ./frontend/src ./src
COPY ./frontend/public ./public
COPY ./frontend/.env.production ./frontend/vue.config.js ./
COPY /frontend/src ./src
COPY /frontend/public ./public
COPY /frontend/.env.production ./frontend/vue.config.js ./

RUN npm run build
RUN mv dist /tmp/dist && rm -r * && mv /tmp/dist/* .
Expand All @@ -28,8 +28,9 @@ RUN mkdir /.storage
RUN ln -s /.storage /double-take/.storage

WORKDIR /double-take
RUN echo "# Double Take\n\n\n" >> config.yml

RUN npm install nodemon -g

CMD nodemon --watch config.yml api/server.js
COPY /entrypoint.sh .

ENTRYPOINT ["/bin/bash", "./entrypoint.sh"]
Loading

0 comments on commit e73e3fb

Please sign in to comment.