Hi,
i am trying to deploy retool on ecs using cf with local database. i don't want to use rds as i am exploring retool for. i am using image tryretool/backend:3.33.16-stable for retool and in my taskdefinition i am using postgress images but i when deploying ecs task i am facing error:
May 03, 2024 at 13:23 (UTC+5:30) Failing checking database migrations retool
May 03, 2024 at 13:23 (UTC+5:30) --------------------------- retool
May 03, 2024 at 13:23 (UTC+5:30) - EXITING RETOOL - retool
May 03, 2024 at 13:23 (UTC+5:30) --------------------------- retool
May 03, 2024 at 13:23 (UTC+5:30) Error running database migrations: SequelizeConnectionError: database "retool" does not exist retool
May 03, 2024 at 13:23 (UTC+5:30) {"level":"info","message":"[process service types] DB_CONNECTOR, DB_SSH_CONNECTOR, MAIN_BACKEND, JOBS_RUNNER, WORKFLOW_WORKER","timestamp":"2024-05-03T07:53:46.519Z"} retool
May 03, 2024 at 13:23 (UTC+5:30) sed: can't read ./dist/mobile/*.js: No such file or directory retool
May 03, 2024 at 13:23 (UTC+5:30) not untarring the bundle
Here is my taskdefintion:
RetoolTaskDefinition:
Type: AWS::ECS::TaskDefinition
Properties:
Family: 'retool-task'
ExecutionRoleArn: 'arn:aws:iam::501168932878:role/ecsTaskExecutionRole'
RequiresCompatibilities:
- FARGATE
NetworkMode: awsvpc
Cpu: '2048'
Memory: '4096'
ContainerDefinitions:
- Name: 'retool'
Image: tryretool/backend:3.33.16-stable
DependsOn:
- ContainerName: postgres
Condition: HEALTHY
Essential: true
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-group: !Ref RetoolECSLogGroup
awslogs-region: !Ref Region
awslogs-stream-prefix: ecs
Environment:
- Name: DATABASE_URL
Value: postgres://postgres:password@postgres:5432/retool
- Name: LICENSE_KEY
Value: !Ref LicenseKey
- Name: JWT_SECRET
Value: !Ref JwtSecret
PortMappings:
- ContainerPort: 3000
- Name: postgres
Image: postgres:11
Command: ["postgres", "-c", "log_statement=all"]
Essential: true
PortMappings:
- ContainerPort: 5432
Environment:
- Name: POSTGRES_PASSWORD
Value: password
- Name: POSTGRES_DB
Value: retool
HealthCheck:
Command: ['CMD-SHELL', 'pg_isready -U postgres']
Interval: 30
Timeout: 5
Retries: 3
StartPeriod: 0
what changes are required here