-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
49 lines (48 loc) · 1.41 KB
/
docker-compose.yaml
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
version: '3.9'
services:
php:
image: php:7.2-apache
container_name: my-php-app
ports:
- '80:80'
volumes:
- ./website:/var/www/html/
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: 'meetups'
# So you don't have to use root, but you can if you like
MYSQL_USER: 'meetups'
# You can use whatever password you like
MYSQL_PASSWORD: '<password>'
# Password for root access
MYSQL_ROOT_PASSWORD: '<password>'
ports:
# <Port exposed> : <MySQL Port running inside container>
- '3306:3306'
expose:
# Opens port 3306 on the container
- '3306'
# Where our data will be persisted
volumes:
- my-db:/var/lib/mysql
# Names our volume
volumes:
my-db:
# db:
# image: postgis/postgis:15-3.3
# environment:
# # If you need to create multiple database you can add coma separated databases eg gis,data
# - POSTGRES_DB=gis
# - POSTGRES_USER=docker
# - POSTGRES_PASSWORD=docker
# - ALLOW_IP_RANGE=0.0.0.0/0
# # Add extensions you need to be enabled by default in the DB. Default are the five specified below
# - POSTGRES_MULTIPLE_EXTENSIONS=postgis,hstore,postgis_topology,postgis_raster,pgrouting
# - RUN_AS_ROOT=true
# ports:
# - "5439:5432"
# restart: on-failure
# healthcheck:
# test: "PGPASSWORD=docker pg_isready -h 127.0.0.1 -U docker -d gis"