diff --git a/docker-compose.rc.yml b/docker-compose.rc.yml index 32977f31..7c76dee4 100644 --- a/docker-compose.rc.yml +++ b/docker-compose.rc.yml @@ -15,28 +15,56 @@ services: networks: - tipi_main_network + tipi-db: + container_name: tipi-db + image: postgres:latest + restart: on-failure + stop_grace_period: 1m + volumes: + - ./data/postgres:/var/lib/postgresql/data + ports: + - 5432:5432 + environment: + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_USER: tipi + POSTGRES_DB: tipi + healthcheck: + test: [ "CMD-SHELL", "pg_isready -d tipi -U tipi" ] + interval: 5s + timeout: 10s + retries: 120 + networks: + - tipi_main_network + api: image: meienberger/runtipi:rc-${TIPI_VERSION} - command: bash -c "cd /api && npm run start" + command: /bin/sh -c "cd /api && npm run build && npm run start" container_name: api ports: - 3001:3001 + depends_on: + tipi-db: + condition: service_healthy volumes: ## Docker sock - /var/run/docker.sock:/var/run/docker.sock:ro - ${PWD}:/tipi environment: - - INTERNAL_IP=${INTERNAL_IP} - - TIPI_VERSION=${TIPI_VERSION} - - JWT_SECRET=${JWT_SECRET} - - ROOT_FOLDER_HOST=${ROOT_FOLDER_HOST} - - NGINX_PORT=${NGINX_PORT} + INTERNAL_IP: ${INTERNAL_IP} + TIPI_VERSION: ${TIPI_VERSION} + JWT_SECRET: ${JWT_SECRET} + ROOT_FOLDER_HOST: ${ROOT_FOLDER_HOST} + NGINX_PORT: ${NGINX_PORT} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_USERNAME: tipi + POSTGRES_DBNAME: tipi + POSTGRES_HOST: tipi-db networks: - tipi_main_network dashboard: image: meienberger/runtipi:rc-${TIPI_VERSION} - command: bash -c "cd /dashboard && npm run start" + command: /bin/sh -c "cd /dashboard && npm run start" container_name: dashboard ports: - 3000:3000 diff --git a/package.json b/package.json index 27eb782c..4e856999 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "runtipi", - "version": "0.3.1", + "version": "0.4.0", "description": "A homeserver for everyone", "scripts": { "test": "jest", diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index eba34305..a9b9e67c 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -1,6 +1,6 @@ { "name": "dashboard", - "version": "0.3.1", + "version": "0.4.0", "private": true, "scripts": { "test": "jest --colors", diff --git a/packages/system-api/package.json b/packages/system-api/package.json index ccbc1a92..37a5f480 100644 --- a/packages/system-api/package.json +++ b/packages/system-api/package.json @@ -1,6 +1,6 @@ { "name": "system-api", - "version": "0.3.1", + "version": "0.4.0", "description": "", "exports": "./dist/server.js", "type": "module",