-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
55 lines (50 loc) · 1.17 KB
/
docker-compose.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
version: "3"
services:
symfony_php:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:80"
volumes:
- .:/var/www/html
networks:
- symfony_network
environment:
DATABASE_URL: mysql://${DOCKER_DB_USER}:${DOCKER_DB_PASSWORD}@db:3306/${DOCKER_DB_NAME}
JWT_SECRET_KEY: /var/www/symfony/config/jwt/private.pem
JWT_PUBLIC_KEY: /var/www/symfony/config/jwt/public.pem
JWT_PASSPHRASE: ${JWT_PASSPHRASE}
CORS_ALLOW_ORIGIN: '*'
db:
image: mysql:latest
container_name: symfony_mysql
restart: unless-stopped
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_DATABASE: ${DOCKER_DB_NAME}
MYSQL_USER: ${DOCKER_DB_USER}
MYSQL_PASSWORD: ${DOCKER_DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DOCKER_DB_ROOT_PASSWORD}
networks:
- symfony_network
phpmyadmin:
image: phpmyadmin
container_name: symfony_phpmyadmin
restart: always
depends_on:
- db
ports:
- 9000:80
environment:
PMA_HOST: db
networks:
- symfony_network
networks:
symfony_network:
driver: bridge
volumes:
db_data: