I am currently trying to deploy the Corteza project on AWS Elastic Beanstalk. However, once it’s deployed, I access the EC2 instance created, and I can see that the containers are running. But when I try to access it through the URL, it doesn’t work because it takes too long to respond.
Esta es la configuracion que tengo:
docker-compose.yml
version: '3.5'
services:
nginx-proxy:
image: nginxproxy/nginx-proxy:alpine
container_name: nginx-proxy
restart: always
networks:
- proxy
ports:
- "80:80"
- "443:443"
volumes:
- ./certs:/etc/nginx/certs
- ./htpasswd:/etc/nginx/htpasswd
- ./vhost.d:/etc/nginx/vhost.d
- ./html:/usr/share/nginx/html
- ./custom.conf:/etc/nginx/conf.d/custom.conf:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
nginx-letsencrypt:
image: nginxproxy/acme-companion
container_name: nginx-letsencrypt
restart: always
depends_on:
- nginx-proxy
volumes_from:
- nginx-proxy:rw
volumes:
- certs:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
- acme:/etc/acme.sh
environment:
- DEFAULT_EMAIL=sebaxayala@gmail.com
networks:
- proxy
server:
image: cortezaproject/corteza:${VERSION}
networks: [ proxy, internal ]
restart: always
env_file: [ .env ]
depends_on: [ db ]
volumes: [ "./data/server:/data" ]
environment:
# VIRTUAL_HOST helps NginX proxy route traffic for specific virtual host to
# this container
# This value is also picked up by initial boot auto-configuration procedure
# If this is changed, make sure you change settings accordingly
VIRTUAL_HOST: ${DOMAIN}
# This is needed only if you are using NginX Lets-Encrypt companion
# (see docs.cortezaproject.org for details)
LETSENCRYPT_HOST: ${DOMAIN}
LETSENCRYPT_TEST: true
db:
# PostgreSQL Database
# See https://hub.docker.com/_/postgres for details
image: postgres:13
networks: [ internal ]
depends_on: [ nginx-proxy, nginx-letsencrypt ]
restart: always
healthcheck: { test: ["CMD-SHELL", "pg_isready -U corteza"], interval: 60s, timeout: 40s, retries: 5 }
environment:
# Warning: these are values that are only used on 1st start
# if you want to change it later, you need to do that
# manually inside db container
POSTGRES_USER: corteza
POSTGRES_PASSWORD: corteza
networks:
internal: {}
proxy:
external: true
volumes:
conf: {}
vhost: {}
html: {}
dhparam: {}
certs: {}
acme: {}
.platform/hooks/prebuild/build_network.sh
#!/bin/bash
docker network create proxy
.env
########################################################################################################################
# docker-compose supports environment variable interpolation/substitution in compose configuration file
# (more info: https://docs.docker.com/compose/environment-variables)
########################################################################################################################
# General settings
DOMAIN=dev-environment.eba-r348ixa8.us-east-2.elasticbeanstalk.com
VERSION=2023.3.4
########################################################################################################################
# Database connection
DB_DSN=postgres://corteza:corteza@db:5432/corteza?sslmode=disable
########################################################################################################################
# Server settings
# Serve Corteza webapps alongside API
HTTP_WEBAPP_ENABLED=true
# Send action log to container logs as well
# ACTIONLOG_DEBUG=true
# Uncomment for extra debug info if something goes wrong
# LOG_LEVEL=debug
# Use nicer and colorful log instead of JSON
# LOG_DEBUG=true
########################################################################################################################
# Authentication
# Secret to use for JWT token
# Make sure you change it (>30 random characters) if
# you expose your deployment to outside traffic
AUTH_JWT_SECRET=5A497VemC4Pe1QbfFPx2JwSTgxMgud2BA12323ddd
########################################################################################################################
# SMTP (mail sending) settings
# Point this to your local or external SMTP server if you want to send emails.
# In most cases, Corteza can detect that SMTP is disabled and skips over sending emails without an error
#SMTP_HOST=smtp-server.example.tld:587
#SMTP_USER=postmaster@smtp-server.example.tld
#SMTP_PASS=this-is-your-smtp-password
#SMTP_FROM='"Demo" <info@your-demo.example.tld>'
custom.conf
client_max_body_size 1g;
# allows nginx to support larger file uploads
proxy_read_timeout 86400s;
# support longer running requests as opposed to the default 60s
client_header_buffer_size 64k;
# increase the size of the client header buffer to support larger headers, as sometimes cookie data can get large
large_client_header_buffers 4 64k;
# increase the number of buffers to support larger headers
proxy_ignore_client_abort on;
# close connection immidiately when client aborts
proxy_buffer_size 128k;
# increase the size of the buffer used for reading the response from the proxied server
proxy_buffers 4 256k;
# size of the buffers for a single connection
proxy_busy_buffers_size 256k;
# size of buffers during sending to proxied server and buffering the response