Error trying to deploy to AWS

I just encountered an error when trying to deploy my Wappler app to AWS EC2. This has not happened before.

Building web
[+] Building 0.3s (9/9) FINISHED
 => [internal] load build definition from Dockerfile                                                                                             0.0s 
 => => transferring dockerfile: 32B                                                                                                              0.0s 
 => [internal] load .dockerignore                                                                                                                0.0s 
 => => transferring context: 34B                                                                                                                 0.0s 
 => [internal] load metadata for docker.io/wapplerio/node-12:latest                                                                              0.0s 
 => [1/4] FROM docker.io/wapplerio/node-12                                                                                                       0.0s 
 => [internal] load build context                                                                                                                0.0s 
 => => transferring context: 34B                                                                                                                 0.0s 
Building db
Sending build context to Docker daemon  67.07kB
Step 1/2 : FROM postgres:11.1
 ---> 5a02f920193b
Step 2/2 : COPY db_init/ /docker-entrypoint-initdb.d/
 ---> Using cache
 ---> ae98ea0ed01a
Successfully built ae98ea0ed01a
Successfully tagged benchmark__staging_db:latest
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context wil
l have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
Building web
Sending build context to Docker daemon  3.593MB
Step 1/4 : FROM wapplerio/node-12
 ---> 7f4100422308
Step 2/4 : COPY ./ /opt/node_app/
 ---> b02e8ad50d36
Step 3/4 : WORKDIR /opt/node_app
 ---> Running in d016f5c177f3   
Removing intermediate container d016f5c177f3
 ---> 7d8c1e138d65
Step 4/4 : RUN npm install --no-optional --production
 ---> Running in 69c6127e994d
npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbo
x scoped package will recieve updates in the future
npm WARN deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known
 to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known
 to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated   
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated

> aws-sdk@2.930.0 postinstall /opt/node_app/node_modules/aws-sdk
npm WARN lifecycle benchmark@1.0.0~postinstall: cannot run in wd benchmark@1.0.0 bash ./tools/install.sh (wd=/opt/node_app)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","ar
ch":"x64"})

added 38 packages from 21 contributors, removed 11 packages, updated 72 packages and audited 888 packages in 23.185s

12 packages are looking for funding
  run `npm fund` for details

found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
Removing intermediate container 69c6127e994d
 ---> 4956f43b23c8
Successfully built 4956f43b23c8
Successfully tagged benchmark__staging_web:latest
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context wil
l have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
Recreating benchmark__staging_redis_1 ... 
Recreating benchmark__staging_db_1    ... 
Recreating benchmark__staging_db_1    ... done
Recreating benchmark__staging_web_1   ... 
WARNING: Host is already in use by another container
Recreating benchmark__staging_web_1   ... error

ERROR: for benchmark__staging_web_1  Cannot start service web: driver failed programming external connectivity on endpoint benchmark__staging_web_1 (1
aad45e1ab0a85a07b3615b9c34ed99f5750191859f3cd50b9439b7b95073388): Bind for 0.0.0.0:80 failed: port is already allocated

ERROR: for web  Cannot start service web: driver failed programming external connectivity on endpoint benchmark__staging_web_1 (1aad45e1ab0a85a07b3615
b9c34ed99f5750191859f3cd50b9439b7b95073388): Bind for 0.0.0.0:80 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.
Error Launching Services!

Here is my docker-compose.yml (sensitive information has been removed):

version: '3'
services:
  db:
    environment:
      POSTGRES_PASSWORD:
      POSTGRES_USER:
      POSTGRES_DB:
    volumes:
      - 'db-volume:/var/lib/postgresql/data'
    ports:
      - '9906:5432'
    restart: always
    build:
      context: .
      dockerfile: db/Dockerfile
  web:
    depends_on:
      - db
    environment:
      AUTH_ENDPOINT:
      TOKEN_ENDPOINT:
      USERINFO_ENDPOINT:
      LOGOUT_ENDPOINT:
      SMART_DOMAIN:
      MEASUREMENT_ID:
      CLIENT_ID:
      CLIENT_SECRET:
      MODE: staging
    restart: always
    stdin_open: true
    tty: true
    build:
      context: ../../../
      dockerfile: .wappler/targets/Staging/web/Dockerfile
    labels:
      - traefik.enable=true
      - traefik.http.routers.myweb.tls.certresolver=myresolver
      - >-
        traefik.http.routers.myweb.rule=Host(``)
    ports:
      - '80:3000'
  redis:
    image: 'redis:alpine'
    hostname: redis
    networks:
      proxy: ~
    volumes:
      - 'redis-volume:/data'
networks:
  proxy:
    external:
      name: wappler-compose_proxy
volumes:
  db-volume: ~
  letsencrypt:
    driver: local
  redis-volume: ~

I’ve tried reverting my code to the last successful deployment and even tried to start out from a completely fresh EC2 instance but the error persists and I’m out of ideas.
Does anyone know how to resolve this issue?

Community Page
Last updated: