forked from doomwiki/doomwiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (62 loc) · 2.07 KB
/
docker-compose.yml
File metadata and controls
68 lines (62 loc) · 2.07 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
version: '3.8'
services:
# Main Doomwiki dev service using bind mounts for custom code.
doomwiki_dev:
image: ${COMPOSE_PROJECT_NAME}:dev
container_name: ${COMPOSE_PROJECT_NAME}
depends_on:
db:
condition: service_healthy
build:
target: dev
ports:
- ${COMPOSE_WEB_PORT:-8080}:8080
volumes:
# For development we map any files/folders that can be customizable and
# tracked in git. These can be edited in/out of container (e.g. in IDE),
# immediatly tested inside container, and then committed. If using a linux
# filesystem on the host (e.g. WSL) this could be simplfied as a single
# mapping of the entire /app directory, but that will be too slow at
# runtime if mapping from NTFS volumes on the host.
- ./app/w/composer.json:/home/doomwiki/public_html/w/composer.json
- ./app/composer.lock:/home/doomwiki/public_html/w/composer.lock
env_file: .env
# Doomwiki service to simulate a deploy.
doomwiki_deploy:
profiles:
- deploy
image: ${COMPOSE_PROJECT_NAME}:deploy
container_name: ${COMPOSE_PROJECT_NAME}_deploy
depends_on:
db:
condition: service_healthy
build:
target: deploy
args:
# Wheather or not to use a custom root cert needed for local
# environments under the Cisco umbrella. Does not apply to AWS.
USE_MATH_CERT: true
ports:
- ${COMPOSE_WEB_PORT_DEPLOY:-8081}:8080
volumes:
- ./public_html/w/images:/var/www/images
env_file: .env
# DB service, with persistent named volume storage, that's a local stand-in
# for RDS.
db:
image: mariadb
container_name: ${COMPOSE_PROJECT_NAME}_db
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: $MYSQL_DATABASE
MYSQL_USER: $MYSQL_USERNAME
MYSQL_PASSWORD: $MYSQL_PASSWORD
volumes:
- db:/var/lib/mysql
ports:
- ${COMPOSE_MYSQL_PORT:-33060}:3306
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized"]
interval: 10s
volumes:
db: