diff --git a/Dockerfile-dev b/Dockerfile-dev new file mode 100644 index 000000000..1ea476959 --- /dev/null +++ b/Dockerfile-dev @@ -0,0 +1,27 @@ +ARG PNPM_VERSION=7.11.0 +ARG NPM_VERSION=8.19.1 + +FROM node:18-slim +ENV NODE_ENV development +ARG TARGETPLATFORM +WORKDIR /app + +RUN npm --no-update-notifier --no-fund --global install pnpm@${PNPM_VERSION} + +RUN apt update && apt -y install --no-install-recommends ca-certificates git git-lfs openssh-client curl jq cmake sqlite3 openssl psmisc python3 +RUN apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/{apt,dpkg,cache,log}/ +RUN npm --no-update-notifier --no-fund --global install pnpm@${PNPM_VERSION} +RUN npm install -g npm@${PNPM_VERSION} + +RUN mkdir -p ~/.docker/cli-plugins/ +# https://download.docker.com/linux/static/stable/ +RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-20.10.9 -o /usr/bin/docker +# https://github.com/docker/compose/releases +# Reverted to 2.6.1 because of this https://github.com/docker/compose/issues/9704. 2.9.0 still has a bug. +RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-compose-linux-2.6.1 -o ~/.docker/cli-plugins/docker-compose +RUN chmod +x ~/.docker/cli-plugins/docker-compose /usr/bin/docker + +RUN (curl -sSL "https://github.com/buildpacks/pack/releases/download/v0.27.0/pack-v0.27.0-linux.tgz" | tar -C /usr/local/bin/ --no-same-owner -xzv pack) + +EXPOSE 3000 +ENV CHECKPOINT_DISABLE=1 \ No newline at end of file diff --git a/apps/api/src/lib/common.ts b/apps/api/src/lib/common.ts index 6ccd2f71a..32c9468a6 100644 --- a/apps/api/src/lib/common.ts +++ b/apps/api/src/lib/common.ts @@ -20,7 +20,7 @@ import { scheduler } from './scheduler'; import { supportedServiceTypesAndVersions } from './services/supportedVersions'; import { includeServices } from './services/common'; -export const version = '3.10.14'; +export const version = '3.10.15'; export const isDev = process.env.NODE_ENV === 'development'; const algorithm = 'aes-256-ctr'; diff --git a/docker-compose-dev.yaml b/docker-compose-dev.yaml index e1934322c..e35760989 100644 --- a/docker-compose-dev.yaml +++ b/docker-compose-dev.yaml @@ -1,6 +1,30 @@ version: '3.8' services: + coolify: + build: + context: . + dockerfile: Dockerfile-dev + command: pnpm dev:container + env_file: apps/api/.env + environment: + - GITPOD_WORKSPACE_URL=${GITPOD_WORKSPACE_URL} + - CODESANDBOX_HOST=${CODESANDBOX_HOST} + container_name: coolify + ports: + - target: 3000 + published: 3000 + protocol: tcp + mode: host + - target: 3001 + published: 3001 + protocol: tcp + mode: host + volumes: + - ./:/app + - '/var/run/docker.sock:/var/run/docker.sock' + networks: + - coolify-infra fluent-bit: image: coollabsio/coolify-fluent-bit:1.0.0 command: /fluent-bit/bin/fluent-bit -c /fluent-bit/etc/fluent-bit-dev.conf diff --git a/package.json b/package.json index 6f580d533..c183074c7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "3.10.14", + "version": "3.10.15", "license": "Apache-2.0", "repository": "github:coollabsio/coolify", "scripts": { @@ -15,7 +15,8 @@ "format:api": "NODE_ENV=development pnpm run --filter api format", "lint": "run-p -l -n lint:*", "lint:api": "NODE_ENV=development pnpm run --filter api lint", - "dev": "run-p -l -n dev:*", + "dev:container": "pnpm install && pnpm db:push && pnpm db:seed && pnpm dev", + "dev": "run-p -l -n dev:api dev:ui", "dev:api": "NODE_ENV=development pnpm run --filter api dev", "dev:ui": "NODE_ENV=development pnpm run --filter ui dev", "build": "NODE_ENV=production run-p -n build:*", @@ -34,6 +35,7 @@ "docker", "self-host", "iaas", + "paas", "heroku", "netlify", "open-source", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3c7fb8aea..0820847ab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -104,6 +104,7 @@ importers: node-os-utils: 1.3.7 p-all: 4.0.0 p-throttle: 5.0.0 + prisma: 4.4.0 public-ip: 6.0.1 pump: 3.0.0 ssh-config: 4.1.6 @@ -120,7 +121,6 @@ importers: eslint-plugin-prettier: 4.2.1_tgumt6uwl2md3n6uqnggd6wvce nodemon: 2.0.20 prettier: 2.7.1 - prisma: 4.4.0 rimraf: 3.0.2 tsconfig-paths: 4.1.0 typescript: 4.8.4 @@ -532,6 +532,7 @@ packages: /@prisma/engines/4.4.0: resolution: {integrity: sha512-Fpykccxlt9MHrAs/QpPGpI2nOiRxuLA+LiApgA59ibbf24YICZIMWd3SI2YD+q0IAIso0jCGiHhirAIbxK3RyQ==} requiresBuild: true + dev: false /@rollup/pluginutils/4.2.1: resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} @@ -5078,6 +5079,7 @@ packages: requiresBuild: true dependencies: '@prisma/engines': 4.4.0 + dev: false /private/0.1.8: resolution: {integrity: sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==}