fix docker setup
This commit is contained in:
@@ -1,2 +1,6 @@
|
|||||||
FROM node:buster
|
FROM node:buster
|
||||||
RUN yarn global add --silent https://gancio.org/latest.tgz 2> /dev/null
|
RUN yarn global add --silent https://gancio.org/latest.tgz 2> /dev/null
|
||||||
|
|
||||||
|
ADD entrypoint.sh /
|
||||||
|
RUN chmod 755 /entrypoint.sh
|
||||||
|
ENTRYPOINT [ "/bin/sh", "/entrypoint.sh" ]
|
||||||
|
|||||||
4
docs/docker/entrypoint.sh
Executable file
4
docs/docker/entrypoint.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
chown -R node:node /home/node
|
||||||
|
su node -c "$*"
|
||||||
|
|
||||||
@@ -19,12 +19,13 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
restart: always
|
restart: always
|
||||||
image: node:buster
|
image: node:buster
|
||||||
user: node
|
|
||||||
container_name: gancio
|
container_name: gancio
|
||||||
environment:
|
environment:
|
||||||
- PATH=$PATH:/home/node/.yarn/bin
|
- PATH=$PATH:/home/node/.yarn/bin
|
||||||
- GANCIO_DATA=/home/node/data
|
- GANCIO_DATA=/home/node/data
|
||||||
|
- NODE_ENV=production
|
||||||
command: gancio start --docker
|
command: gancio start --docker
|
||||||
|
entrypoint: /entrypoint.sh
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/home/node/data
|
- ./data:/home/node/data
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -5,11 +5,12 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
restart: always
|
restart: always
|
||||||
image: node:buster
|
image: node:buster
|
||||||
user: node
|
|
||||||
container_name: gancio
|
container_name: gancio
|
||||||
environment:
|
environment:
|
||||||
- PATH=$PATH:/home/node/.yarn/bin
|
- PATH=$PATH:/home/node/.yarn/bin
|
||||||
- GANCIO_DATA=/home/node/data
|
- GANCIO_DATA=/home/node/data
|
||||||
|
- NODE_ENV=production
|
||||||
|
entrypoint: /entrypoint.sh
|
||||||
command: gancio start --docker
|
command: gancio start --docker
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/home/node/data
|
- ./data:/home/node/data
|
||||||
|
|||||||
@@ -13,12 +13,9 @@ nav_order: 2
|
|||||||
|
|
||||||
## Initial setup
|
## Initial setup
|
||||||
|
|
||||||
> info "Clone not needed"
|
|
||||||
> You do not need to clone the full repo, a `Dockerfile` and a `docker-compose.yml` are enough.
|
|
||||||
|
|
||||||
- __Create a directory where everything related to gancio is stored__
|
- __Create a directory where everything related to gancio is stored__
|
||||||
```bash
|
```bash
|
||||||
mkdir -p /opt/gancio/data
|
mkdir -p /opt/gancio
|
||||||
cd /opt/gancio
|
cd /opt/gancio
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -27,6 +24,7 @@ cd /opt/gancio
|
|||||||
1. **Download docker-compose.yml and Dockerfile**
|
1. **Download docker-compose.yml and Dockerfile**
|
||||||
```bash
|
```bash
|
||||||
wget {{site.url}}{% link /docker/Dockerfile %}
|
wget {{site.url}}{% link /docker/Dockerfile %}
|
||||||
|
wget {{site.url}}{% link /docker/entrypoint.sh %}
|
||||||
wget {{site.url}}{% link /docker/sqlite/docker-compose.yml %}
|
wget {{site.url}}{% link /docker/sqlite/docker-compose.yml %}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -44,6 +42,7 @@ docker-compose run --rm gancio gancio setup --docker --db=sqlite
|
|||||||
1. **Download docker-compose.yml and Dockerfile**
|
1. **Download docker-compose.yml and Dockerfile**
|
||||||
```bash
|
```bash
|
||||||
wget {{site.url}}{% link /docker/Dockerfile %}
|
wget {{site.url}}{% link /docker/Dockerfile %}
|
||||||
|
wget {{site.url}}{% link /docker/entrypoint.sh %}
|
||||||
wget {{site.url}}{% link /docker/postgres/docker-compose.yml %}
|
wget {{site.url}}{% link /docker/postgres/docker-compose.yml %}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -86,6 +85,7 @@ tail -f data/logs/gancio.log
|
|||||||
> 1. `cd /opt/gancio`
|
> 1. `cd /opt/gancio`
|
||||||
> 1. [Backup your data]({% link install/backup.md %})
|
> 1. [Backup your data]({% link install/backup.md %})
|
||||||
> 1. Download new `Dockerfile` <br/> `wget {{site.url}}{% link /docker/Dockerfile %}`
|
> 1. Download new `Dockerfile` <br/> `wget {{site.url}}{% link /docker/Dockerfile %}`
|
||||||
|
> 1. Download new `entrypoint.sh` <br/> `wget {{site.url}}{% link /docker/entrypoint.sh %}`
|
||||||
> 1. Download new `docker-compose.yml` (substitute `sqlite` with `postgres` in case): <br/>`wget {{site.url}}{% link /docker/sqlite/docker-compose.yml %}`
|
> 1. Download new `docker-compose.yml` (substitute `sqlite` with `postgres` in case): <br/>`wget {{site.url}}{% link /docker/sqlite/docker-compose.yml %}`
|
||||||
> 1. Build the new container `docker-compose build`
|
> 1. Build the new container `docker-compose build`
|
||||||
> 1. Extract your backup into `./data` <br/>`mkdir data; tar xvzf gancio-<yourLastBackup>-backup.tgz -C data`
|
> 1. Extract your backup into `./data` <br/>`mkdir data; tar xvzf gancio-<yourLastBackup>-backup.tgz -C data`
|
||||||
|
|||||||
Reference in New Issue
Block a user