-
-
Notifications
You must be signed in to change notification settings - Fork 139
/
magento.yml
61 lines (56 loc) · 1.67 KB
/
magento.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# sudo sysctl -w vm.max_map_count=262144
# DOMAIN=example.com docker stack deploy -c magento.yml magento
services:
magento:
image: bitnami/magento:${VERSION:-2.4.2}
environment:
- MARIADB_HOST=mariadb
- MARIADB_PORT_NUMBER=3306
- MAGENTO_DATABASE_USER=magento
- MAGENTO_DATABASE_PASSWORD=myp@ssw0rd
- MAGENTO_DATABASE_NAME=magento
- MAGENTO_HOST=${DOMAIN:-magento.localhost}
- MAGENTO_MODE=production
- ELASTICSEARCH_HOST=elasticsearch
- ELASTICSEARCH_PORT_NUMBER=9200
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.magento-${NUMBER:-1}.rule=Host(`${DOMAIN:-magento.localhost}`)
- traefik.http.routers.magento-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.magento-${NUMBER:-1}.service=magento-${NUMBER:-1}
- traefik.http.routers.magento-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.magento-${NUMBER:-1}.loadbalancer.server.port=8080
volumes:
- ${VOLUME_PATH}magento:/bitnami
networks:
- traefik
- internal
mariadb:
image: mariadb:10.5.9
environment:
- MYSQL_ROOT_PASSWORD=myp@ssw0rd
- MYSQL_USER=magento
- MYSQL_PASSWORD=myp@ssw0rd
- MYSQL_DATABASE=magento
volumes:
- ${VOLUME_PATH}mariadb:/var/lib/mysql
networks:
- internal
elasticsearch:
image: elasticsearch:7.14.0
volumes:
- ${VOLUME_PATH}elasticsearch:/bitnami/elasticsearch/data
networks:
- internal
volumes:
mariadb:
magento:
elasticsearch:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net