You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.4 KiB
44 lines
1.4 KiB
services: |
|
postgres: |
|
image: postgres:11.6 |
|
container_name: preinscripcion_postgres |
|
environment: |
|
POSTGRES_DB: preinscripcion |
|
POSTGRES_USER: postgres |
|
POSTGRES_PASSWORD: postgres123 |
|
# Solo se aplican si el volumen está vacío (primera vez) |
|
POSTGRES_INITDB_ARGS: "--encoding=LATIN1 --locale=C --lc-collate=C --lc-ctype=C" |
|
volumes: |
|
- ./postgres_data:/var/lib/postgresql/data |
|
- ./BD/creacion/creacion_preinscripcion3_postgresql.sql:/docker-entrypoint-initdb.d/01-creacion.sql |
|
- ./docker/init-db.sql:/docker-entrypoint-initdb.d/02-init.sql |
|
ports: |
|
- "7011:5432" |
|
restart: unless-stopped |
|
healthcheck: |
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB} || exit 1"] |
|
interval: 5s |
|
timeout: 3s |
|
retries: 20 |
|
|
|
web: |
|
build: . |
|
container_name: preinscripcion_web |
|
depends_on: |
|
postgres: |
|
condition: service_healthy |
|
ports: |
|
- "7003:80" |
|
volumes: |
|
- .:/var/www/html |
|
- ./instalacion/config.php:/var/www/html/instalacion/config.php |
|
- ./instalacion/alias.conf:/var/www/html/instalacion/alias.conf |
|
- ./instalacion/login.php:/var/www/html/instalacion/login.php |
|
- ./apache_logs:/var/log/apache2 |
|
environment: |
|
- DB_HOST=postgres |
|
- DB_PORT=5432 |
|
- DB_NAME=postgres |
|
- DB_USER=postgres |
|
- DB_PASSWORD=postgres123 |
|
restart: unless-stopped
|
|
|