Skip to content

Commit

Permalink
Update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurmmoreira committed Sep 15, 2023
1 parent a8ec94e commit dbc0f87
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 19 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM bitnami/magento:2

RUN apt update
RUN apt -y install unzip
RUN apt -y install nano

RUN echo 'Mutex posixsem' >> /opt/bitnami/apache/conf/httpd.conf
66 changes: 47 additions & 19 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,66 @@
version: '2'
version: "3"
services:
magento:
image: docker.io/bitnami/magento:2
container_name: magento
build: .
platform: linux/amd64
ports:
- '80:8080'
- '443:8443'
- 80:8080
environment:
- MAGENTO_HOST=localhost
- MAGENTO_MODE=developer
- MAGENTO_DATABASE_HOST=mariadb
- MAGENTO_DATABASE_PORT_NUMBER=3306
- MAGENTO_DATABASE_USER=magento
- MAGENTO_DATABASE_PASSWORD=magento
- MAGENTO_DATABASE_NAME=magento
- MAGENTO_DATABASE_USER=bn_magento
- MAGENTO_DATABASE_NAME=bitnami_magento
- MAGENTO_USERNAME=mondu
- MAGENTO_PASSWORD=mondu
- ALLOW_EMPTY_PASSWORD=yes
- ELASTICSEARCH_HOST=elasticsearch
- ELASTICSEARCH_PORT_NUMBER=9200
- PHP_MEMORY_LIMIT=5120M
volumes:
- '.:/bitnami/magento/app/code/Mondu/Mondu'
- 'magento_data:/bitnami/magento'
- magento_data:/bitnami/magento
- .:/bitnami/magento/vendor/mondu/magento2-payment/
depends_on:
- mariadb
- elasticsearch
mariadb:
condition: service_healthy
elasticsearch:
condition: service_healthy
working_dir: /bitnami/magento
mem_limit: 5120MB
memswap_limit: 5120MB
mem_swappiness: 0
mariadb:
image: docker.io/bitnami/mariadb:10.4
image: bitnami/mariadb:10.4
platform: linux/amd64
environment:
- MARIADB_USER=magento
- MARIADB_DATABASE=magento
- MARIADB_PASSWORD=magento
- MARIADB_ROOT_PASSWORD=magento
- ALLOW_EMPTY_PASSWORD=yes
- MARIADB_USER=bn_magento
- MARIADB_DATABASE=bitnami_magento
volumes:
- 'mariadb_data:/bitnami/mariadb'
- mariadb_data:/bitnami/mariadb
healthcheck:
test: ["CMD-SHELL", "mysqladmin -h 'localhost' -u root ping --silent"]
interval: 30s
timeout: 30s
retries: 3
elasticsearch:
image: docker.io/bitnami/elasticsearch:7
image: bitnami/elasticsearch:7
platform: linux/amd64
ports:
- 9200:9200
volumes:
- 'elasticsearch_data:/bitnami/elasticsearch/data'
- elasticsearch_data:/bitnami/elasticsearch/data
depends_on:
mariadb:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
start_period: 60s
interval: 30s
timeout: 60s
retries: 50
volumes:
mariadb_data:
driver: local
Expand Down

0 comments on commit dbc0f87

Please sign in to comment.