-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·72 lines (68 loc) · 2.92 KB
/
docker-compose.yml
File metadata and controls
executable file
·72 lines (68 loc) · 2.92 KB
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
62
63
64
65
66
67
68
69
70
71
72
# use this file for running the docker image
version: '3.4'
services:
web:
shm_size: '256m'
image: ${IMAGE:?IMAGE is not set or empty}
volumes:
- ${VOLUME_DIR_WEB:?VOLUME_DIR_WEB is not set or empty}apache-logs/:/var/log/apache2/
- ${VOLUME_DIR_WEB:?VOLUME_DIR_WEB is not set or empty}config-jwt/:/var/www/html/config/jwt/
- ${VOLUME_DIR_WEB:?VOLUME_DIR_WEB is not set or empty}symfony-logs/:/var/www/html/var/log/
- ${VOLUME_DIR_WEB:?VOLUME_DIR_WEB is not set or empty}images/:/var/www/html/public/images/
environment:
- APP_DEBUG=${APP_DEBUG:-0}
- APP_ENVIRONMENT=${APP_ENVIRONMENT:-prod}
- APP_SECRET=${APP_SECRET:?APP_SECRET is not set or empty}
- MAILER_DSN=${MAILER_DSN:?MAILER_DSN is not set or empty}
- TRUSTED_HOSTS=^(localhost|((${SUBDOMAINS_LIST}\.)?${DOMAIN_NAME}))$$
- CORS_ALLOW_ORIGIN=^https://(${SUBDOMAINS_LIST}\.)?${DOMAIN_NAME}$$
- HOST_UID=${HOST_UID} # set in ~/.bashrc
- HOST_GID=${HOST_GID} # set in ~/.bashrc
- CONTAINER_USER=docker
- CONTAINER_GROUP=docker
- PHP_XDEBUG_ENABLED=${PHP_XDEBUG_ENABLED:?PHP_XDEBUG_ENABLED is not set or empty}
- DEPLOY_ENV=${DEPLOY_ENV:?DEPLOY_ENV is not set or empty}
- VIRTUAL_HOST=${VIRTUAL_HOST:?VIRTUAL_HOST is not set or empty}
# FrankenPHP spricht intern HTTP; TLS terminiert der jwilder/nginx-proxy davor.
- VIRTUAL_PORT=80
- VIRTUAL_PROTO=http
- JWT_PASSPHRASE=${JWT_PASSPHRASE:?JWT_PASSPHRASE is not set or empty}
- DB_NAME=${DB_NAME:?DB_NAME is not set or empty}
- DB_PASSWORD=${DB_PASSWORD:?DB_PASSWORD is not set or empty}
- DB_USER=${DB_USER:?DB_USER is not set or empty}
- LETSENCRYPT_HOST=${LETSENCRYPT_HOST}
- BEHAT_HOST_URL=${BEHAT_HOST_URL:-https://swapp.local/images/screenshots/}
- REDIS_PASSWORD=${REDIS_PASSWORD:?REDIS_PASSWORD is not set or empty}
restart: "always"
depends_on:
- mysql
- redis
healthcheck:
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
mysql:
image: mysql:5.7
volumes:
- ${VOLUME_DIR_MYSQL:?VOLUME_DIR_MYSQL is not set or empty}:/var/lib/mysql/
restart: "always"
environment:
- TZ=Europe/Berlin
- MYSQL_DATABASE=${DB_NAME:?DB_NAME is not set or empty}
- MYSQL_PASSWORD=${DB_PASSWORD:?DB_PASSWORD is not set or empty}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD:?DB_ROOT_PASSWORD is not set or empty}
- MYSQL_USER=${DB_USER:?DB_USER is not set or empty}
redis:
image: redis:7-alpine
command: >
redis-server --requirepass ${REDIS_PASSWORD} --save "" --appendonly yes --appendfsync everysec --maxmemory 1024mb --maxmemory-policy allkeys-lru
restart: always
volumes:
- ${VOLUME_DIR_REDIS:?VOLUME_DIR_REDIS is not set or empty}:/data
expose:
- 6379
networks:
default:
external:
name: swapp-${DEPLOY_ENV?:DEPLOY_ENV is not set or empty}