Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

718
Visualizações
Persistent storage on Elastic Beanstalk Docker Container

I'm looking for some way to mount a S3 Storage Bucket (for example) as Docker volume in an Elastic Beanstalk Docker Container.

Since i can't change the application code, i have to configure that part in the Dockerrun.aws.json file using Docker volumes.

I need to mount a file for a single configuration file and a volume for a file directory in my application.

Here's my Dockerrun.aws.json file.

{
    "AWSEBDockerrunVersion": "1",

    "Image": {
        "Name": "app"
    },
    "Ports": [
        {
            "ContainerPort": 8080,
            "HostPort" : 80
        }

    ],
    "environment": [
        {
          "name": "app_DB_MYSQL",
          "value": ""
        },
        {
            "name": "app_DB_USERNAME",
            "value": "app"
        },
        {
            "name": "app_DB_PASSWORD",
            "value": ""
        },
        {
            "name": "app_DB_DATABASE",
            "value": "app"
        }
      ],

      "volumes": [
        {
            "HostDirectory": "files",
            "containerPath": "/usr/src/app/files",
        },

        {
            "HostDirectory": "configuration.yaml",
            "containerPath": "/usr/src/app/config/configuration.yaml",
        }
      ],

    "Logging": "/var/log",

}
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

For persistent storage Elastic Beanstalk with Amazon Elastic File System is generally used:

  1. edit storage-efs-createfilesystem.config, add it to the .ebextensions directory and deploy
  2. then remove storage-efs-createfilesystem.config from .ebextensions, edit and add storage-efs-mountfilesystem.config to .ebextensions, edit Dockerrun.aws.json to match storage-efs-mountfilesystem.config and redeploy.

Sample storage-efs-mountfilesystem.config extract:

option_settings:
  aws:elasticbeanstalk:application:environment:
    FILE_SYSTEM_ID: 'fs-REPLACE_THIS_WITH_ID!'
    MOUNT_DIRECTORY: '/efs'

Sample Dockerrun.aws.json extract:

"Volumes": [
    {
        "HostDirectory": "/efs/app",
        "ContainerDirectory": "/usr/src/app",
    }
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda