diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..006ecd05 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM node:latest +EXPOSE 13120 +WORKDIR / +#COPY config/default.json /data/gancio/config/gancio_config.json +RUN yarn global add gancio +ENTRYPOINT ["gancio", "start", "--config", "/data/gancio/gancio_config.json"] +#CMD ["gancio", "start", "--config", "/data/gancio/gancio_config.json"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..c0fd472c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,34 @@ +version: '3' + +services: + db: + image: postgres + container_name: postgres + volumes: + # - ./db.sql:docker-entrypoint-initdb.d/db.sql + - db:/var/lib/postgres + - /etc/localtime:/etc/localtime:ro + environment: + - POSTGRES_USER=gancio + - POSTGRES_DB=gancio + - POSTGRES_PASSWORD=gancio + restart: always + ports: + - 5432:5432 + app: + image: node:latest + container_name: gancio + build: . + volumes: + - ./db.sqlite:/data/gancio/db.sqlite + - ./gancio_config.json:/data/gancio/gancio_config.json:ro + - ./uploads:/data/gancio/uploads + depends_on: + - db + ports: + - 13120:13120 +volumes: + db: + gancio: + + diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 00000000..fa0b483c --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,7 @@ +FROM node:latest +EXPOSE 13120 +WORKDIR / +#COPY config/default.json /data/gancio/config/gancio_config.json +RUN yarn global add gancio +#ENTRYPOINT ["gancio", "--config", "/gancio/config.json"] +#CMD ["gancio", "start", "--config", "/data/gancio/gancio_config.json"] diff --git a/docker/db.sqlite b/docker/db.sqlite new file mode 100644 index 00000000..ad63406a Binary files /dev/null and b/docker/db.sqlite differ diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 00000000..987c03f0 --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,33 @@ +version: '3' + +services: + db: + image: postgres + container_name: postgres + volumes: + - ./init.sql:/docker-entrypoint-initdb.d/init.sql + - db:/var/lib/postgres + - /etc/localtime:/etc/localtime:ro + environment: + - POSTGRES_USER=gancio + - POSTGRES_DB=gancio + - POSTGRES_PASSWORD=gancio + restart: always + ports: + - 5432:5432 + gancio: + build: . + image: node:latest + container_name: gancio + command: gancio start /gancio/config.json + volumes: + - ./db.sqlite:/gancio/db.sqlite + - ./config.json:/gancio/config.json + - ./uploads:/gancio/uploads + depends_on: + - db + ports: + - 13120:13120 +volumes: + db: + gancio: \ No newline at end of file diff --git a/docker/init.db b/docker/init.db new file mode 100644 index 00000000..e69de29b diff --git a/package.json b/package.json index e13e4612..101b7b5a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gancio", - "version": "0.9.31", + "version": "0.10.0", "description": "A shared agenda for local communities", "author": "lesion", "scripts": {