Skip to content

Commit d468f3a

Browse files
authored
Merge pull request #434 from cibero42/fix-426
Fix Volume Persistance
2 parents 3158577 + abdf637 commit d468f3a

File tree

12 files changed

+19
-28
lines changed

12 files changed

+19
-28
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ Variable | Default | Required | Accepted Values | Description
122122
`DEBUG` | false | | `true`, `false` | Enable verbose logs
123123
`DOCKER_MAUTIC_ROLE` | mautic_web | | `mautic_cron`, `mautic_web`, `mautic_worker (string) | Container role
124124
`DOCKER_MAUTIC_LOAD_TEST_DATA` | false | | `true`, `false` | Load demo instance
125-
`DOCKER_MAUTIC_RUN_MIGRATIONS` | false | | `true`, `false` | Update directory and database structure (please run on major updates)
126125
`DOCKER_MAUTIC_WORKERS_CONSUME_EMAIL` | 2 | | integer | Number of workers to start consuming e-mails
127126
`DOCKER_MAUTIC_WORKERS_CONSUME_HIT` | 2 | | integer | Number of workers to start consuming hits
128127
`DOCKER_MAUTIC_WORKERS_CONSUME_FAILED` | 2 | | integer | Number of workers to start consuming failed e-mails

apache/Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ RUN cd /opt && \
6565

6666
FROM php:8.3-apache
6767

68+
LABEL vendor="Mautic"
69+
LABEL maintainer="Mautic core team <>"
70+
71+
# Define Mautic volumes to persist data
72+
VOLUME /var/www/html/config
73+
VOLUME /var/www/html/var/logs
74+
VOLUME /var/www/html/docroot/media/files
75+
VOLUME /var/www/html/docroot/media/images
76+
6877
# Setting PHP properties
6978
ENV PHP_INI_VALUE_DATE_TIMEZONE='UTC' \
7079
PHP_INI_VALUE_MEMORY_LIMIT=512M \
@@ -151,16 +160,8 @@ RUN a2enmod rewrite
151160
# Set correct ownership for Mautic var folder
152161
RUN chown -R www-data:www-data /var/www/html/var/
153162

154-
# Define Mautic volumes to persist data
155-
VOLUME /var/www/html/config
156-
VOLUME /var/www/html/var/logs
157-
VOLUME /var/www/html/docroot/media
158-
159163
WORKDIR /var/www/html/docroot
160164

161-
LABEL vendor="Mautic"
162-
LABEL maintainer="Mautic core team <>"
163-
164165
ENTRYPOINT ["/entrypoint.sh"]
165166

166167
CMD ["apache2-foreground"]

common/entrypoint_mautic_web.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ if [ "$DOCKER_MAUTIC_LOAD_TEST_DATA" = "true" ]; then
99
fi
1010

1111
# run migrations
12-
if [ "$DOCKER_MAUTIC_RUN_MIGRATIONS" = "true" ]; then
13-
su -s /bin/bash $MAUTIC_WWW_USER -c "php $MAUTIC_CONSOLE doctrine:migration:migrate -n"
14-
fi
12+
su -s /bin/bash $MAUTIC_WWW_USER -c "php $MAUTIC_CONSOLE doctrine:migration:migrate -n"
1513

1614
# execute the provided entrypoint
1715
"$@"

examples/basic/.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ MYSQL_DATABASE=mautic_db
66
MYSQL_USER=mautic_db_user
77
MYSQL_PASSWORD=mautic_db_pwd
88
MYSQL_ROOT_PASSWORD=changeme
9-
DOCKER_MAUTIC_RUN_MIGRATIONS=false
109
DOCKER_MAUTIC_LOAD_TEST_DATA=false

examples/basic/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ services:
3535

3636
environment:
3737
- DOCKER_MAUTIC_LOAD_TEST_DATA=${DOCKER_MAUTIC_LOAD_TEST_DATA}
38-
- DOCKER_MAUTIC_RUN_MIGRATIONS=${DOCKER_MAUTIC_RUN_MIGRATIONS}
3938
env_file:
4039
- .mautic_env
4140
healthcheck:

examples/custom-plugins/.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ MYSQL_USER=mautic_db_user
88
MYSQL_PASSWORD=
99
# MYSQL_ROOT_PASSWORD should be set to a long secure alphanumeric sequence
1010
MYSQL_ROOT_PASSWORD=
11-
DOCKER_MAUTIC_RUN_MIGRATIONS=false
1211
DOCKER_MAUTIC_LOAD_TEST_DATA=false

examples/custom-plugins/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ services:
3636

3737
environment:
3838
- DOCKER_MAUTIC_LOAD_TEST_DATA=${DOCKER_MAUTIC_LOAD_TEST_DATA}
39-
- DOCKER_MAUTIC_RUN_MIGRATIONS=${DOCKER_MAUTIC_RUN_MIGRATIONS}
4039
env_file:
4140
- .mautic_env
4241
healthcheck:

examples/fpm-nginx/.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ MYSQL_DATABASE=mautic_db
66
MYSQL_USER=mautic_db_user
77
MYSQL_PASSWORD=mautic_db_pwd
88
MYSQL_ROOT_PASSWORD=changeme
9-
DOCKER_MAUTIC_RUN_MIGRATIONS=false
109
DOCKER_MAUTIC_LOAD_TEST_DATA=false

examples/fpm-nginx/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ services:
4848

4949
environment:
5050
- DOCKER_MAUTIC_LOAD_TEST_DATA=${DOCKER_MAUTIC_LOAD_TEST_DATA}
51-
- DOCKER_MAUTIC_RUN_MIGRATIONS=${DOCKER_MAUTIC_RUN_MIGRATIONS}
5251
env_file:
5352
- .mautic_env
5453
healthcheck:

examples/rabbitmq-worker/.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ MYSQL_USER=mautic_db_user
77
MYSQL_PASSWORD=mautic_db_pwd
88
MYSQL_ROOT_PASSWORD=changeme
99
RABBITMQ_DEFAULT_VHOST=mautic
10-
DOCKER_MAUTIC_RUN_MIGRATIONS=false
1110
DOCKER_MAUTIC_LOAD_TEST_DATA=false

0 commit comments

Comments
 (0)