-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·59 lines (54 loc) · 1.48 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
56
57
58
59
version: '3.0'
services:
db:
image: mariadb:10.9.2
container_name: db
working_dir: /app
command: [ mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb-file-per-table=1]
env_file: .env
volumes:
- mariadb-storage:/var/lib/mysql
networks:
- appnetwork
# https://docs.docker.com/compose/compose-file/compose-file-v3/#restart
restart: unless-stopped # restart always, unless the container is "stopped" (manually or otherwise)
# following is only valid for `docker stack deploy` / "deploy to a swarm":
# https://docs.docker.com/compose/compose-file/compose-file-v3/#restart_policy)
# deploy:
# restart_policy:
# condition: any
# delay: 2s
# max_attempts: 3
# window: 0s
api:
container_name: api
build:
context: .
dockerfile: ./devops/DockerfilePHP
env_file: .env
volumes:
- .:/var/www/html
# if we would need it, we could override the php.ini like:
- ./devops/php.ini:/usr/local/etc/php/php.ini
ports:
- 9000:80
depends_on:
- db
networks:
- appnetwork
restart: "no" # never restart automatically ([no] must be specifically wrapped in quotes "")
# dev services
adminer:
container_name: adminer
image: adminer:4.8.1
ports:
- 8080:8080
depends_on:
- db
networks:
- appnetwork
restart: unless-stopped
volumes:
mariadb-storage:
networks:
appnetwork: