generated from AmpersandTarski/project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
57 lines (53 loc) · 1.57 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
volumes:
db-data:
networks:
prototype:
services:
## Ampersand prototype container
prototype:
container_name: prototype
image: ampersand-prototype:latest
build:
context: project
restart: unless-stopped
depends_on:
- prototype-db
ports:
- "80:80"
networks:
- prototype
environment:
- AMPERSAND_LOG_CONFIG=logging.debug.yaml
- AMPERSAND_DEBUG_MODE=true
- AMPERSAND_DBHOST=prototype-db # refers to database service below
- AMPERSAND_DBUSER=ampersand
- AMPERSAND_DBPASS=${MYSQL_AMPERSAND_PASSWORD} # from .env file
- AMPERSAND_SERVER_URL=${SERVER_HOST_NAME} # from .env file
## MariaDB database required by prototype
prototype-db:
container_name: prototype-db
image: mariadb:10.4
restart: unless-stopped
command: ["--lower-case-table-names=1", "--sql-mode=ANSI,TRADITIONAL"]
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:?} # from .env file
- MYSQL_USER=ampersand
- MYSQL_PASSWORD=${MYSQL_AMPERSAND_PASSWORD:?} # from .env file
volumes:
- db-data:/var/lib/mysql
- ./db-init-scripts:/docker-entrypoint-initdb.d # script to setup db authorization for user ampersand.
networks:
- prototype
## Utility service for database management
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: phpmyadmin
restart: unless-stopped
environment:
PMA_HOST: prototype-db # refers to database service above
depends_on:
- prototype-db
ports:
- "8080:80"
networks:
- prototype