fail to create volumes
+ again changes in makefile, to be abble to erase volumes only
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
|
||||
# DOCKER-COMPOSE
|
||||
|
||||
LOGIN=$USER
|
||||
|
||||
# MARIADB SETUP
|
||||
|
||||
DB_NAME=db_wp_inception
|
||||
|
||||
@@ -10,21 +10,26 @@ version: "3.8"
|
||||
services:
|
||||
# ---------------------------------
|
||||
nginx:
|
||||
#restart: on-failure
|
||||
restart: on-failure
|
||||
networks:
|
||||
- inception
|
||||
ports:
|
||||
- "443:443"
|
||||
- "80:80"
|
||||
build:
|
||||
context: ./requirements/nginx
|
||||
dockerfile: Dockerfile
|
||||
build: ./requirements/nginx
|
||||
image: nginx
|
||||
container_name: mynginx
|
||||
container_name: nginx_container
|
||||
depends_on:
|
||||
wordpress:
|
||||
condition: service_started
|
||||
# ---------------------------------
|
||||
mariadb:
|
||||
#restart: on-failure
|
||||
networks:
|
||||
- inception-network
|
||||
restart: on-failure
|
||||
env_file: .env
|
||||
networks:
|
||||
- inception
|
||||
# volumes:
|
||||
# - db_volume:/var/lib/mysql
|
||||
build:
|
||||
context: ./requirements/mariadb
|
||||
args:
|
||||
@@ -32,24 +37,41 @@ services:
|
||||
- DB_USER=${DB_USER}
|
||||
- DB_PSWD=${DB_PSWD}
|
||||
image: mariadb
|
||||
container_name: mymariadb
|
||||
container_name: mariadb_container
|
||||
# ---------------------------------
|
||||
wordpress:
|
||||
#restart: on-failure
|
||||
# networks:
|
||||
# - inception-network
|
||||
restart: on-failure
|
||||
env_file: ./.env
|
||||
networks:
|
||||
- inception
|
||||
volumes:
|
||||
- type: volume
|
||||
source: wp_volume
|
||||
target: /var/www/html
|
||||
bind:
|
||||
create_host_path: true
|
||||
build: ./requirements/wordpress
|
||||
# context: ./requirements/wordpress
|
||||
# args:
|
||||
# - WP_DIR=${WP_DIR}
|
||||
# depends_on:
|
||||
# mariadb:
|
||||
# condition: service_completed_successfully
|
||||
image: wordpress
|
||||
container_name: mywordpress
|
||||
container_name: wordpress_container
|
||||
depends_on:
|
||||
mariadb:
|
||||
condition: service_started
|
||||
|
||||
# specify path to named volumes : https://docs.docker.com/compose/compose-file/compose-file-v3/#volume-configuration-reference
|
||||
volumes:
|
||||
wp_volume:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: "bind"
|
||||
device: /home/${LOGIN}/data/wp_volume
|
||||
# db_volume:
|
||||
# driver: local
|
||||
# driver_opts:
|
||||
# type: none
|
||||
# o: "bind"
|
||||
# mountpoint: /home/${LOGIN}/data/db_volume
|
||||
|
||||
networks:
|
||||
inception-network:
|
||||
driver: bridge
|
||||
inception:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user