use long syntax bind mounts

This commit is contained in:
Robin 2021-06-28 11:42:03 +02:00
parent 909468030c
commit 057aee3ce6

View File

@ -1,24 +1,33 @@
version: '2' version: '3.2'
services: services:
nginx: nginx:
image: namelessmc/nginx:v2-pr10 image: namelessmc/nginx:v2-pr10
ports: ['80:80'] ports: ['80:80']
volumes: ['./web:/data'] # same as php container volumes:
# environment: - type: bind # same as php container
source: ./web
target: /data'
# environment: # Change this if you rename the php container
# PHP_FPM: php:9000 # PHP_FPM: php:9000
depends_on: [php] depends_on: [php]
restart: always restart: always
php: php:
image: namelessmc/php:v2-pr10 image: namelessmc/php:v2-pr10
volumes: ['./web:/data'] # same as web container volumes:
- type: bind # same as web container
source: ./web
target: /data'
restart: always restart: always
db: db:
image: mariadb image: mariadb
volumes: ['./db:/var/lib/mysql'] volumes:
- type: bind
source: ./db
target: /var/lib/mysql
environment: environment:
MYSQL_ROOT_PASSWORD: nameless MYSQL_ROOT_PASSWORD: nameless
MYSQL_USER: nameless MYSQL_USER: nameless