dokku / dokku

A docker-powered PaaS that helps you build and manage the lifecycle of applications
https://dokku.com
MIT License
26.42k stars 1.84k forks source link

App does not update after successful deployment using dokku git:from-image #6302

Closed gamedevsam closed 6 months ago

gamedevsam commented 8 months ago

Description of problem

I'm attempting to deploy a locally built docker image via SSH into Dokku. Up to this point I've been using git push and letting Dokku build the docker image, but my builds are quite large and it's eating into my disk space on my remove box. To solve that I leaned into using dokku git:from-image to load a pre-built image that I generate on my local machine.

I've gotten to the point where the build & deployment succeeds, but for some reason dokku seems to just re-deploy the existing version instead of the new image specified in git:from-image. Here's the commands I'm running in a nutshell:

# on local machine:
docker image build --label=com.dokku.app-name=app-dev --tag=dokku/app-dev:cmv99bd5t0rbtjajw0s0 .
docker image save dokku/app-dev:cmv99bd5t0rbtjajw0s0 | gzip > dist/app-dev_cmv99bd5t0rbtjajw0s0.tar.gz

# on remote machine: 
mkdir -p tmp/docker_images

# I don't do it like this, but imagine we download the archived docker image from the local machine
wget https://example_server/app-dev_cmv99bd5t0rbtjajw0s0.tar.gz

# load docker image
docker load < app-dev_cmv99bd5t0rbtjajw0s0.tar.gz

# set the builder to null, otherwise I get git related error
dokku builder:set app-dev selected null

# this succeeds, but doesn't do what I expect
dokku git:from-image app-dev dokku/app-dev:cmv99bd5t0rbtjajw0s0

Steps to reproduce

  1. Create a simple server that returns a hard-coded number in /version endpoint.
  2. Deploy to dokku using git
  3. Update hard-coded number
  4. Build docker image with unique tag
  5. Upload docker image to dokku server
  6. Load docker image into server
  7. Set builder to null
  8. Use dokku git:from-image command to deploy docker image
  9. Observe app deploys, but hitting '/version' returns the previous number

dokku report $APP_NAME

root@ubuntu-2gb-ash-1:~# dokku report app-dev
-----> uname: Linux ubuntu-2gb-ash-1 5.15.0-86-generic #96-Ubuntu SMP Wed Sep 20 08:23:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
-----> memory:
                      total        used        free      shared  buff/cache   available
       Mem:            1915        1096         109          63         710         569
       Swap:           4095         705        3390
-----> docker version:
       Client: Docker Engine - Community
        Version:           24.0.6
        API version:       1.43
        Go version:        go1.20.7
        Git commit:        ed223bc
        Built:             Mon Sep  4 12:31:44 2023
        OS/Arch:           linux/amd64
        Context:           default

       Server: Docker Engine - Community
        Engine:
         Version:          24.0.6
         API version:      1.43 (minimum version 1.12)
         Go version:       go1.20.7
         Git commit:       1a79695
         Built:            Mon Sep  4 12:31:44 2023
         OS/Arch:          linux/amd64
         Experimental:     false
        containerd:
         Version:          1.6.24
         GitCommit:        61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
        runc:
         Version:          1.1.9
         GitCommit:        v1.1.9-0-gccaecfc
        docker-init:
         Version:          0.19.0
         GitCommit:        de40ad0
-----> docker daemon info:
       Client: Docker Engine - Community
        Version:    24.0.6
        Context:    default
        Debug Mode: true
        Plugins:
         buildx: Docker Buildx (Docker Inc.)
           Version:  v0.11.2
           Path:     /usr/libexec/docker/cli-plugins/docker-buildx
         compose: Docker Compose (Docker Inc.)
           Version:  v2.21.0
           Path:     /usr/libexec/docker/cli-plugins/docker-compose

       Server:
        Containers: 19
         Running: 16
         Paused: 0
         Stopped: 3
        Images: 25
        Server Version: 24.0.6
        Storage Driver: overlay2
         Backing Filesystem: extfs
         Supports d_type: true
         Using metacopy: false
         Native Overlay Diff: true
         userxattr: false
        Logging Driver: json-file
        Cgroup Driver: systemd
        Cgroup Version: 2
        Plugins:
         Volume: local
         Network: bridge host ipvlan macvlan null overlay
         Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
        Swarm: inactive
        Runtimes: runc io.containerd.runc.v2
        Default Runtime: runc
        Init Binary: docker-init
        containerd version: 61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
        runc version: v1.1.9-0-gccaecfc
        init version: de40ad0
        Security Options:
         apparmor
         seccomp
          Profile: builtin
         cgroupns
        Kernel Version: 5.15.0-86-generic
        Operating System: Ubuntu 22.04.3 LTS
        OSType: linux
        Architecture: x86_64
        CPUs: 2
        Total Memory: 1.871GiB
        Name: ubuntu-2gb-ash-1
        ID: 94748842-242f-4cd7-b5f2-6395d5cb7bf5
        Docker Root Dir: /var/lib/docker
        Debug Mode: false
         File Descriptors: 121
         Goroutines: 110
         System Time: 2023-10-23T15:50:13.274126189Z
         EventsListeners: 1
        Experimental: false
        Insecure Registries:
         127.0.0.0/8
        Live Restore Enabled: false

-----> git version: git version 2.34.1
-----> sigil version: 0.10.1build+e443be0
-----> herokuish version:
 !     Herokuish image gliderlabs/herokuish:latest-22 is not available
-----> dokku version: dokku version 0.31.4
-----> plugn version: plugn: 0.13.0build+fd5297a
-----> dokku plugins:
         00_dokku-standard    0.31.4 enabled    dokku core standard plugin
         20_events            0.31.4 enabled    dokku core events logging plugin
         app-json             0.31.4 enabled    dokku core app-json plugin
         apps                 0.31.4 enabled    dokku core apps plugin
         builder              0.31.4 enabled    dokku core builder plugin
         builder-dockerfile   0.31.4 enabled    dokku core builder-dockerfile plugin
         builder-herokuish    0.31.4 enabled    dokku core builder-herokuish plugin
         builder-lambda       0.31.4 enabled    dokku core builder-lambda plugin
         builder-null         0.31.4 enabled    dokku core builder-null plugin
         builder-pack         0.31.4 enabled    dokku core builder-pack plugin
         buildpacks           0.31.4 enabled    dokku core buildpacks plugin
         caddy-vhosts         0.31.4 enabled    dokku core caddy-vhosts plugin
         certs                0.31.4 enabled    dokku core certificate management plugin
         checks               0.31.4 enabled    dokku core checks plugin
         common               0.31.4 enabled    dokku core common plugin
         config               0.31.4 enabled    dokku core config plugin
         cron                 0.31.4 enabled    dokku core cron plugin
         docker-options       0.31.4 enabled    dokku core docker-options plugin
         domains              0.31.4 enabled    dokku core domains plugin
         enter                0.31.4 enabled    dokku core enter plugin
         git                  0.31.4 enabled    dokku core git plugin
         haproxy-vhosts       0.31.4 enabled    dokku core haproxy-vhosts plugin
         letsencrypt          0.20.0 enabled    Automated installation of let's encrypt TLS certificates
         logs                 0.31.4 enabled    dokku core logs plugin
         maintenance          0.7.2 enabled    Maintenance mode for apps
         mariadb              1.34.0 enabled    dokku mariadb service plugin
         network              0.31.4 enabled    dokku core network plugin
         nginx-vhosts         0.31.4 enabled    dokku core nginx-vhosts plugin
         openresty-vhosts     0.31.4 enabled    dokku core openresty-vhosts plugin
         plugin               0.31.4 enabled    dokku core plugin plugin
         ports                0.31.4 enabled    dokku core ports plugin
         postgres             1.34.0 enabled    dokku postgres service plugin
         proxy                0.31.4 enabled    dokku core proxy plugin
         ps                   0.31.4 enabled    dokku core ps plugin
         redirect             0.9.1 enabled    Plugin for managing application redirects
         registry             0.31.4 enabled    dokku core registry plugin
         repo                 0.31.4 enabled    dokku core repo plugin
         resource             0.31.4 enabled    dokku core resource plugin
         run                  0.31.4 enabled    dokku core run plugin
         scheduler            0.31.4 enabled    dokku core scheduler plugin
         scheduler-docker-local 0.31.4 enabled    dokku core scheduler-docker-local plugin
         scheduler-null       0.31.4 enabled    dokku core scheduler-null plugin
         shell                0.31.4 enabled    dokku core shell plugin
         ssh-keys             0.31.4 enabled    dokku core ssh-keys plugin
         storage              0.31.4 enabled    dokku core storage plugin
         trace                0.31.4 enabled    dokku core trace plugin
         traefik-vhosts       0.31.4 enabled    dokku core traefik-vhosts plugin
=====> app-dev app-json information
       App json computed selected:    app.json
       App json global selected:      app.json
       App json selected:
=====> app-dev app information
       App created at:                1688871814
       App deploy source:             docker-image
       App deploy source metadata:    dokku/app-dev:cmv99bd5t0rbtjajw0s0
       App dir:                       /home/dokku/app-dev
       App locked:                    false
=====> app-dev builder information
       Builder build dir:
       Builder computed build dir:
       Builder computed selected:
       Builder global build dir:
       Builder global selected:
       Builder selected:
=====> app-dev builder-dockerfile information
       Builder dockerfile computed dockerfile path: Dockerfile
       Builder dockerfile global dockerfile path: Dockerfile
       Builder dockerfile dockerfile path:
=====> app-dev builder-herokuish information
       Builder herokuish computed allowed: true
       Builder herokuish global allowed: true
       Builder herokuish allowed:
=====> app-dev builder-lambda information
       Builder lambda computed lambdayml path: lambda.yml
       Builder lambda global lambdayml path: lambda.yml
       Builder lambda lambdayml path:
=====> app-dev builder-pack information
       Builder pack computed projecttoml path: project.toml
       Builder pack global projecttoml path: project.toml
       Builder pack projecttoml path:
=====> app-dev buildpacks information
       Buildpacks computed stack:     gliderlabs/herokuish:latest-22
       Buildpacks global stack:
       Buildpacks list:
       Buildpacks stack:
=====> app-dev caddy information
       Caddy image:                   lucaslorentz/caddy-docker-proxy:2.8
       Caddy letsencrypt email:
       Caddy letsencrypt server:      https://acme-v02.api.letsencrypt.org/directory
       Caddy log level:               ERROR
       Caddy polling interval:        5s
       Caddy tls internal:            false
=====> app-dev ssl information
       Ssl dir:                       /home/dokku/app-dev/tls
       Ssl enabled:                   true
       Ssl hostnames:                 dev.dataconnector.pro dev.dataconnector-pro.com dev.dataconnectorpro.com
       Ssl expires at:                Dec 16 17:44:18 2023 GMT
       Ssl issuer:                    C = US, O = Let's Encrypt, CN = R3
       Ssl starts at:                 Sep 17 17:44:19 2023 GMT
       Ssl subject:                   subject=CN = dev.dataconnectorpro.com
       Ssl verified:                  self signed
=====> app-dev checks information
       Checks disabled list:          none
       Checks skipped list:           none
       Checks computed wait to retire: 60
       Checks global wait to retire:  60
       Checks wait to retire:
=====> app-dev docker options information
       Docker options build:          --link dokku.postgres.app_dev:dokku-postgres-app-dev
       Docker options deploy:         --link dokku.postgres.app_dev:dokku-postgres-app-dev --restart=on-failure:10
       Docker options run:            --link dokku.postgres.app_dev:dokku-postgres-app-dev
=====> app-dev domains information
       Domains app enabled:           true
       Domains app vhosts:            dev.dataconnectorpro.com dev.dataconnector-pro.com dev.dataconnector.pro
       Domains global enabled:        true
       Domains global vhosts:         5.161.194.197.sslip.io
=====> app-dev git information
       Git deploy branch:             dev
       Git global deploy branch:      master
       Git keep git dir:              false
       Git rev env var:               GIT_REV
       Git sha:                       c3317c9a
       Git source image:
       Git last updated at:           1698075917
=====> app-dev haproxy information
       Haproxy image:                 byjg/easy-haproxy:4.3.0
       Haproxy letsencrypt email:
       Haproxy letsencrypt server:    https://acme-v02.api.letsencrypt.org/directory
       Haproxy log level:             ERROR
=====> app-dev letsencrypt information
       Letsencrypt active:            true
       Letsencrypt autorenew:         false
       Letsencrypt computed dns provider:
       Letsencrypt global dns provider:
       Letsencrypt dns provider:
       Letsencrypt computed email:    sambatista1@gmail.com
       Letsencrypt global email:      sambatista1@gmail.com
       Letsencrypt email:
       Letsencrypt expiration:        1702748658
       Letsencrypt computed graceperiod: 2592000
       Letsencrypt global graceperiod:
       Letsencrypt graceperiod:
       Letsencrypt computed lego docker args:
       Letsencrypt global lego docker args:
       Letsencrypt lego docker args:
       Letsencrypt computed server:   https://acme-v02.api.letsencrypt.org/directory
       Letsencrypt global server:
       Letsencrypt server:
=====> app-dev logs information
       Logs computed max size:        10m
       Logs global max size:          10m
       Logs global vector sink:
       Logs max size:
       Logs vector sink:
=====> app-dev maintenance information
       Maintenance enabled:           false
=====> app-dev network information
       Network attach post create:
       Network attach post deploy:
       Network bind all interfaces:          false
       Network computed attach post create:
       Network computed attach post deploy:
       Network computed bind all interfaces: false
       Network computed initial network:
       Network computed tld:
       Network global attach post create:
       Network global attach post deploy:
       Network global bind all interfaces:   false
       Network global initial network:
       Network global tld:
       Network initial network:
       Network static web listener:
       Network tld:
       Network web listeners:                172.17.0.11:5000
=====> app-dev nginx information
       Nginx access log format:
       Nginx access log path:         /var/log/nginx/app-dev-access.log
       Nginx bind address ipv4:
       Nginx bind address ipv6:       ::
       Nginx client max body size:
       Nginx disable custom config:   false
       Nginx error log path:          /var/log/nginx/app-dev-error.log
       Nginx global hsts:             true
       Nginx computed hsts:           true
       Nginx hsts:
       Nginx hsts include subdomains: true
       Nginx hsts max age:            15724800
       Nginx hsts preload:            false
       Nginx computed nginx conf sigil path: infrastructure/nginx/nginx.conf.sigil
       Nginx global nginx conf sigil path: nginx.conf.sigil
       Nginx nginx conf sigil path:   infrastructure/nginx/nginx.conf.sigil
       Nginx proxy buffer size:       4096
       Nginx proxy buffering:         on
       Nginx proxy buffers:           8 4096
       Nginx proxy busy buffers size: 8192
       Nginx proxy read timeout:      60s
       Nginx last visited at:         1698076189
       Nginx x forwarded for value:   $remote_addr
       Nginx x forwarded port value:  $server_port
       Nginx x forwarded proto value: $scheme
       Nginx x forwarded ssl:
=====> app-dev openresty information
       Openresty access log format:
       Openresty access log path:     /var/log/nginx/app-dev-access.log
       Openresty bind address ipv4:
       Openresty bind address ipv6:   ::
       Openresty client max body size:
       Openresty error log path:      /var/log/nginx/app-dev-error.log
       Openresty global hsts:         true
       Openresty computed hsts:       true
       Openresty hsts:
       Openresty hsts include subdomains: true
       Openresty hsts max age:        15724800
       Openresty hsts preload:        false
       Openresty image:               dokku/openresty-docker-proxy:0.5.6
       Openresty letsencrypt email:
       Openresty letsencrypt server:  https://acme-v02.api.letsencrypt.org/directory
       Openresty proxy buffer size:   4096
       Openresty proxy buffering:     on
       Openresty proxy buffers:       8 4096
       Openresty proxy busy buffers size: 8192
       Openresty proxy read timeout:  60s
       Openresty x forwarded for value: $remote_addr
       Openresty x forwarded port value: $server_port
       Openresty x forwarded proto value: $scheme
       Openresty x forwarded ssl:
=====> app-dev ports information
       Ports map:                     http:80:5000 https:443:5000
       Ports map detected:            http:80:5000 https:443:5000
=====> app-dev proxy information
       Proxy enabled:                 true
       Proxy type:                    nginx
=====> app-dev ps information
       Deployed:                      true
       Processes:                     1
       Ps can scale:                  true
       Ps computed procfile path:     Procfile
       Ps global procfile path:       Procfile
       Ps procfile path:
       Ps restart policy:             on-failure:10
       Restore:                       true
       Running:                       true
       Status web 1:                  running (CID: 678704a052c)
=====> app-dev registry information
       Registry computed image repo:      dokku/app-dev
       Registry computed push on release: false
       Registry computed server:
       Registry global push on release:
       Registry global server:
       Registry image repo:
       Registry push on release:
       Registry server:
       Registry tag version:
=====> app-dev resource information
=====> app-dev scheduler information
       Scheduler computed selected:   docker-local
       Scheduler global selected:     docker-local
       Scheduler selected:
=====> app-dev scheduler-docker-local information
       Scheduler docker local disable chown:
       Scheduler docker local init process: true
       Scheduler docker local parallel schedule count:
=====> app-dev storage information
       Storage build mounts:
       Storage deploy mounts:
       Storage run mounts:
=====> app-dev traefik information
       Traefik api enabled:           false
       Traefik api vhost:             traefik.dokku.me
       Traefik basic auth password:
       Traefik basic auth username:
       Traefik dashboard enabled:     false
       Traefik image:                 traefik:v2.10
       Traefik letsencrypt email:
       Traefik letsencrypt server:    https://acme-v02.api.letsencrypt.org/directory
       Traefik log level:             ERROR
       Traefik priority:
root@ubuntu-2gb-ash-1:~#

Additional information

Logs of successful deployment via SSH + dokku git:from-image:

samuel@SAMUEL-DESKTOP:~/WSL_Dev/Personal/dokku_app$ pnpm deploy_dev

> dataconnector-pro@1.3.4 deploy_dev /home/samuel/WSL_Dev/Personal/dokku_app
> node --unhandled-rejections=strict infrastructure/package_scripts/deploy_dev.mjs

[deploy_dev]: BEGIN: node --unhandled-rejections=strict ./infrastructure/package_scripts/deploy_dokku.mjs --app_name=app-dev
[deploy_dokku]: Building docker image: 'app-dev:cmv99bd5t0rbtjajw0s0', please wait...
[deploy_dokku]: BEGIN: docker image build --label=com.dokku.app-name=app-dev --tag=dokku/app-dev:cmv99bd5t0rbtjajw0s0 .
[+] Building 73.2s (38/38) FINISHED                                                                                                                                                                              docker:default
 => [internal] load .dockerignore                                                                                                                                                                                          0.0s
 => => transferring context: 119B                                                                                                                                                                                          0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                       0.0s
 => => transferring dockerfile: 3.86kB                                                                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/node:18-alpine                                                                                                                                                          0.1s
 => [base 1/4] FROM docker.io/library/node:18-alpine@sha256:435dcad253bb5b7f347ebc69c8cc52de7c912eb7241098b920f2fc2d7843183d                                                                                               0.0s
 => [internal] load build context                                                                                                                                                                                          0.1s
 => => transferring context: 852.92kB                                                                                                                                                                                      0.1s
 => CACHED [base 2/4] RUN corepack enable && corepack prepare pnpm@latest --activate                                                                                                                                       0.0s
 => CACHED [base 3/4] RUN pnpm config set store-dir /tmp/cache/pnpm                                                                                                                                                        0.0s
 => CACHED [base 4/4] RUN apk add bash                                                                                                                                                                                     0.0s
 => CACHED [package_json 1/6] WORKDIR /tmp                                                                                                                                                                                 0.0s
 => CACHED [package_json 2/6] COPY /package.json ./package.json                                                                                                                                                            0.0s
 => CACHED [package_json 3/6] COPY /src/client/package.json ./src/client/package.json                                                                                                                                      0.0s
 => CACHED [package_json 4/6] COPY /src/server/package.json ./src/server/package.json                                                                                                                                      0.0s
 => CACHED [package_json 5/6] COPY /src/dashboard/package.json ./src/dashboard/package.json                                                                                                                                0.0s
 => CACHED [package_json 6/6] COPY /pnpm-lock.yaml  ./                                                                                                                                                                     0.0s
 => CACHED [node_modules 2/5] COPY --from=package_json /tmp ./                                                                                                                                                             0.0s
 => CACHED [node_modules 3/5] COPY /pnpm-workspace.yaml  ./                                                                                                                                                                0.0s
 => CACHED [node_modules 4/5] COPY /infrastructure/packages ./infrastructure/packages                                                                                                                                      0.0s
 => CACHED [node_modules 5/5] RUN --mount=type=cache,id=pnpm-store,target=/tmp/cache/pnpm  pnpm install --frozen-lockfile --unsafe-perm                                                                                    0.0s
 => CACHED [build 1/8] WORKDIR /build                                                                                                                                                                                      0.0s
 => [build 2/8] COPY . .                                                                                                                                                                                                   0.5s
 => [build 3/8] COPY --from=node_modules /tmp ./                                                                                                                                                                           4.0s
 => [build 4/8] RUN --mount=type=cache,id=pnpm-store,target=/tmp/cache/pnpm  pnpm install --frozen-lockfile --unsafe-perm                                                                                                  1.9s
 => [build 5/8] RUN NODE_ENV=production pnpm run build                                                                                                                                                                    56.8s 
 => [build 6/8] RUN rm -rf node_modules && pnpm recursive exec -- rm -rf ./node_modules                                                                                                                                    4.3s
 => [build 7/8] RUN --mount=type=cache,id=pnpm-store,target=/tmp/cache/pnpm pnpm install --frozen-lockfile --unsafe-perm --prod                                                                                            1.8s
 => [build 8/8] RUN npx prisma generate                                                                                                                                                                                    1.3s
 => CACHED [package  1/11] WORKDIR /app                                                                                                                                                                                    0.0s
 => [package  2/11] COPY --from=build --chown=node:node /build/src/client/build ./src/client/build                                                                                                                         0.1s
 => [package  3/11] COPY --from=build --chown=node:node /build/app.json ./app.json                                                                                                                                         0.0s
 => [package  4/11] COPY --from=build --chown=node:node /build/package.json ./package.json                                                                                                                                 0.0s
 => [package  5/11] COPY --from=build --chown=node:node /build/node_modules ./node_modules                                                                                                                                 0.6s
 => [package  6/11] COPY --from=build --chown=node:node /build/infrastructure ./infrastructure                                                                                                                             0.0s
 => [package  7/11] COPY --from=build --chown=node:node /build/src/server/dist ./src/server/dist                                                                                                                           0.0s
 => [package  8/11] COPY --from=build --chown=node:node /build/src/server/node_modules ./src/server/node_modules                                                                                                           0.0s
 => [package  9/11] COPY --from=build --chown=node:node /build/src/shared/i18n/__generated__ ./src/shared/i18n/__generated__                                                                                               0.0s
 => [package 10/11] COPY --from=build --chown=node:node /build/src/shared/schema/__generated__ ./src/shared/schema/__generated__                                                                                           0.0s
 => [package 11/11] COPY --from=build --chown=node:node /build/src/shared/schema/archive ./src/shared/schema/archive                                                                                                       0.0s
 => exporting to image                                                                                                                                                                                                     0.8s
 => => exporting layers                                                                                                                                                                                                    0.8s
 => => writing image sha256:0b16bc9bef07fbb1fb01e2ab91820ba23ec90b7d9bb2af760f4f2780209f02db                                                                                                                               0.0s
 => => naming to docker.io/dokku/app-dev:cmv99bd5t0rbtjajw0s0                                                                                                                                                              0.0s
[deploy_dokku]: END: docker image build --label=com.dokku.app-name=app-dev --tag=dokku/app-dev:cmv99bd5t0rbtjajw0s0 . (1m:14s)
[deploy_dokku]: Creating archive from docker image, please wait...
[deploy_dokku]: BEGIN: docker image save dokku/app-dev:cmv99bd5t0rbtjajw0s0 | gzip > dist/app-dev_cmv99bd5t0rbtjajw0s0.tar.gz
[deploy_dokku]: END: docker image save dokku/app-dev:cmv99bd5t0rbtjajw0s0 | gzip > dist/app-dev_cmv99bd5t0rbtjajw0s0.tar.gz (11.77s)
[deploy_dokku]: mkdir -p tmp/docker_images completed in 0.12s
[deploy_dokku]: Uploading 'app-dev_cmv99bd5t0rbtjajw0s0.tar.gz', please wait...
[deploy_dokku]: Upload of 'app-dev_cmv99bd5t0rbtjajw0s0.tar.gz' completed in 3.39s
Loaded image: dokku/app-dev:cmv99bd5t0rbtjajw0s0

[deploy_dokku]: docker load < app-dev_cmv99bd5t0rbtjajw0s0.tar.gz completed in 5.66s
=====> Setting selected to null

[deploy_dokku]: dokku builder:set app-dev selected null completed in 0.15s
-----> Generating build context

       Setting Dockerfile

-----> Image exists on host, skipping pull

-----> Updating git repository with specified build context

From /tmp/dokku-2523814-trigger-git-git-from-directory.PLUEgR
   3842d9fc..c3317c9a  master           -> master
 * [new ref]           origin/HEAD      -> origin/HEAD
 * [new ref]           origin/dev       -> origin/dev

 * [new ref]           origin/master    -> origin/master
 * [new ref]           origin/wip/nginx -> origin/wip/nginx

-----> Cleaning up...

-----> Releasing app-dev...

-----> Checking for predeploy task

-----> Executing predeploy task from app.json: node --unhandled-rejections=strict infrastructure/package_scripts/dokku/predeploy.mjs

=====> Start of app-dev predeploy task (494c8c492) output

       Prisma schema loaded from infrastructure/prisma/schema.prisma
       Datasource "db": PostgreSQL database "app_dev", schema "public" at "dokku-postgres-app-dev:5432"
       9 migrations found in prisma/migrations
       No pending migrations to apply.
       [db_migrate_deploy]: npx prisma migrate deploy completed in 1.78s
       Running seed command `node --unhandled-rejections=strict infrastructure/prisma/seed.mjs` ...
       Start seeding ...
       Found client_duct_doctor: cj96yqtkzkyywg22tw6g
       Seeding finished.
       🌱  The seed command has been executed.
       [db_seed]: npx prisma db seed completed in 1.74s

=====> End of app-dev predeploy task (494c8c492) output

-----> Checking for release task

       No release task found, skipping

=====> Processing deployment checks

       No CHECKS file found. Simple container checks will be performed.

       For more efficient zero downtime deployments, create a CHECKS file. See https://dokku.com/docs/deployment/zero-downtime-deploys/ for examples

-----> Deploying app-dev via the docker-local scheduler...

-----> Deploying web (count=1)

       Attempting pre-flight checks (web.1)

-----> Executing 1 healthchecks                                                        

       Running healthcheck name='default' type='uptime' uptime=10                      

       Healthcheck succeeded name='default'                                            

       All checks successful (web.1)

=====> Start of app-dev container output (web.1)

       > dataconnector-pro@1.3.1 start /app
       > node --unhandled-rejections=strict infrastructure/package_scripts/start.mjs
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG 🏁 Starting Nest server v1.3.1 with Node v18.18.2 & NODE_ENV=development
       [Nest] 18  - 10/23/2023, 3:45:31 PM   DEBUG [feature_flags_store] Feature Flags Request
       [Nest] 18  - 10/23/2023, 3:45:31 PM   DEBUG [feature_flags_store] Feature Flags Response
       {
         "TEST": true
       }
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [NestFactory] Starting Nest application... +23ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] AppModule dependencies initialized +46ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] ApiModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] AdminModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] MigrationsModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] PrismaModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] ClientsModule dependencies initialized +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] ClusterLockModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] RedirectsModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] GatewaysModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] PagesModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] NewsletterModule dependencies initialized +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] DashboardModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] VersionModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] TerminusModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] SchemaModule dependencies initialized +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] CqrsModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] MetricsModule dependencies initialized +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] DashboardModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] EntityModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] HealthModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] UserModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] DuctDoctorModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [InstanceLoader] StripeModule dependencies initialized +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG 📖 OpenApi swagger enabled, access docs at: /api
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG 🗂️  Serving static client: /app/src/client/build
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [WsLoggerGateway] WebSockets connection available at port 5000
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [WebSocketsController] WsLoggerGateway subscribed to the "log" message +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RoutesResolver] EntityController {/api/admin/entity}: +2ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/admin/entity/:id, GET} route +3ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/admin/entity, GET} route +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/admin/entity, POST} route +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/admin/entity/validate, POST} route +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/admin/entity/migrate/all, POST} route +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/admin/entity/migrate/one, POST} route +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/admin/entity/:id, DELETE} route +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RoutesResolver] MetricsController {/api/admin/metrics}: +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/admin/metrics, GET} route +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RoutesResolver] SchemaController {/api/admin/schema}: +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/admin/schema, ALL} route +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RoutesResolver] DuctDoctorController {/api/clients/duct_doctor}: +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/clients/duct_doctor/zoho_auth, POST} route +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/clients/duct_doctor/zoho_access_token, GET} route +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/clients/duct_doctor/zoho_fields, GET} route +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/clients/duct_doctor/zoho_test_sync, POST} route +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/clients/duct_doctor/webhook, POST} route +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/clients/duct_doctor/errors, DELETE} route +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RoutesResolver] DashboardController {/api/dashboard}: +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/dashboard/events, GET} route +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RoutesResolver] HealthController {/api/health}: +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/health, GET} route +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RoutesResolver] NewsletterController {/api/newsletter}: +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/newsletter, POST} route +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RoutesResolver] StripeController {/api/stripe}: +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/stripe/create_billing_session, POST} route +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/stripe/create_checkout_session, POST} route +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/stripe/webhook, POST} route +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RoutesResolver] UserController {/api/user}: +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/user, GET} route +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/user, POST} route +1ms

       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RoutesResolver] VersionController {/api/version}: +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/version, GET} route +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/api/version/schema, GET} route +1ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RoutesResolver] DashboardController {/dashboard}: +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [RouterExplorer] Mapped {/dashboard, GET} route +0ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG [NestApplication] Nest application successfully started +6ms
       [Nest] 18  - 10/23/2023, 3:45:31 PM     LOG ✅  Server started in 1.61s: http://0.0.0.0:5000
=====> End of app-dev container output (web.1)

       Scheduling old container shutdown in 60 seconds (web.1)

=====> Triggering early nginx proxy rebuild

-----> Ensuring network configuration is in sync for app-dev

-----> Overriding default nginx.conf with detected nginx.conf.sigil

-----> Configuring dev.dataconnector.pro...(using app-supplied template)

-----> Configuring dev.dataconnector-pro.com...(using app-supplied template)

-----> Configuring dev.dataconnectorpro.com...(using app-supplied template)

-----> Creating https nginx.conf

       Enabling HSTS

-----> Configuring redirect for devdataconnector.pro to dev.dataconnector-pro.com via HTTP 301...

-----> Configuring redirect for dev.dataconnector.pro to dev.dataconnector-pro.com via HTTP 301...

-----> Configuring redirect for dev.dataconnectorpro.com to dev.dataconnector-pro.com via HTTP 301...

       Reloading nginx

-----> Running post-deploy

 !     Detected IPv4 domain name with nginx proxy enabled.

 !     Ensure the default nginx site is removed before continuing.

-----> Ensuring network configuration is in sync for app-dev

-----> Overriding default nginx.conf with detected nginx.conf.sigil

-----> Configuring dev.dataconnector.pro...(using app-supplied template)

-----> Configuring dev.dataconnector-pro.com...(using app-supplied template)

-----> Configuring dev.dataconnectorpro.com...(using app-supplied template)

-----> Creating https nginx.conf

       Enabling HSTS

-----> Configuring redirect for devdataconnector.pro to dev.dataconnector-pro.com via HTTP 301...

-----> Configuring redirect for dev.dataconnector.pro to dev.dataconnector-pro.com via HTTP 301...

-----> Configuring redirect for dev.dataconnectorpro.com to dev.dataconnector-pro.com via HTTP 301...

       Reloading nginx

-----> Renaming containers

       Found previous container(s) (1c8483c92584) named app-dev.web.1

       Renaming container (1c8483c92584) app-dev.web.1 to app-dev.web.1.1698075943

       Renaming container app-dev.web.1.upcoming-15001 (678704a052c5) to app-dev.web.1

-----> Checking for postdeploy task

-----> Executing postdeploy task from app.json: node --unhandled-rejections=strict infrastructure/package_scripts/dokku/postdeploy.mjs

=====> Start of app-dev postdeploy task (b6fc9362d) output

       Filesystem                Size      Used Available Use% Mounted on
       overlay                  37.2G     18.6G     17.0G  52% /
       [dokku/postdeploy]: df -h / completed in 0.00s

=====> End of app-dev postdeploy task (b6fc9362d) output

-----> Shutting down old containers in 60 seconds

=====> Application deployed:

       http://dev.dataconnector.pro
       http://dev.dataconnector-pro.com
       http://dev.dataconnectorpro.com
       https://dev.dataconnector.pro
       https://dev.dataconnector-pro.com
       https://dev.dataconnectorpro.com

[deploy_dokku]: dokku git:from-image app-dev dokku/app-dev:cmv99bd5t0rbtjajw0s0 completed in 29.79s
[deploy_dokku]: BEGIN: rm app-dev_cmv99bd5t0rbtjajw0s0.tar.gz
[deploy_dokku]: END: rm app-dev_cmv99bd5t0rbtjajw0s0.tar.gz (0.01s)
=====> Unsetting source-image

[deploy_dokku]: dokku git:set app-dev source-image completed in 0.13s
=====> Unsetting selected

[deploy_dokku]: dokku builder:set app-dev selected completed in 0.16s
[deploy_dokku]: rm app-dev_cmv99bd5t0rbtjajw0s0.tar.gz completed in 0.12s
[deploy_dev]: END: node --unhandled-rejections=strict ./infrastructure/package_scripts/deploy_dokku.mjs --app_name=app-dev (2m:06s)

Output of failing commands after running: dokku trace:off

No response

Output of failing commands after running: dokku trace:on

No response

gamedevsam commented 8 months ago

Note: If I don't set the builder to null, I get this error:

-----> Building app-dev from Dockerfile

#0 building with "default" instance using docker driver

#1 [internal] load .dockerignore

#1 transferring context: 2B done
#1 DONE 0.0s

#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 172B done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/dokku/app-dev:cmv9j995t0ren7c1vdmg

#3 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
------
 > [internal] load metadata for docker.io/dokku/app-dev:cmv9j995t0ren7c1vdmg:
------
Dockerfile:1
--------------------
   1 | >>> FROM dokku/app-dev:cmv9j995t0ren7c1vdmg
   2 |     LABEL com.dokku.docker-image-labeler/alternate-tags=[\"dokku/app-dev:cmv9j995t0ren7c1vdmg\"]
   3 |     
--------------------
ERROR: failed to solve: dokku/app-dev:cmv9j995t0ren7c1vdmg: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
josegonzalez commented 8 months ago

Do you have a sample app I can use to verify this behavior?

gamedevsam commented 8 months ago

Hey do you mind following up with me on Discord? It will be easier for me to just give you access to my repo and let you SSH into my server to see what's going on.

josegonzalez commented 8 months ago

Yeah I can do that - currently somewhere without internet access (mobile only) and tethering doesn't quite work. Will follow up tomorrow.

gamedevsam commented 6 months ago

@josegonzalez poke, would love to see some progress on this issue, also Merry Christmas and happy new years!

D4uS1 commented 6 months ago

Hey guys, did you find any solution? I am currently facing the same issue and can not update applications deployed using git:from-image.

gamedevsam commented 6 months ago

Yes! I was able to make it work by removing --label=com.dokku.app-name=app-dev from the docker image build command, so happy I got it to work!

patr1ck commented 5 months ago

Hi, I ran into this as well, when trying to update my Ghost app. I ended up just doing a docker image pull ghost and dokku ps:rebuild myghostapp.com and that worked.

josegonzalez commented 5 months ago

If the image tag doesn't change, that won't trigger a rebuild (as documented).