diff --git a/docker-compose.yml b/docker-compose.yml index edc24df..aa5a8d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,8 @@ services: build: api-payroll/ ports: - "8085:80" + volumes: + - ./volumes/apache-logs:/var/log/apache2 depends_on: - mysql mysql: @@ -16,10 +18,11 @@ services: ports: - "3307:3307" volumes: - - my-datavolume:/var/lib/mysql + - ./volumes/mysql-data:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: '12345678' MYSQL_USER: 'sloth' MYSQL_PASS: '12345678' volumes: - my-datavolume: + mysql-data: + apache-logs: diff --git a/volumes/.gitignore b/volumes/.gitignore new file mode 100644 index 0000000..9e750a3 --- /dev/null +++ b/volumes/.gitignore @@ -0,0 +1,2 @@ +mysql-data/ +apache-logs/ diff --git a/volumes/README.md b/volumes/README.md new file mode 100644 index 0000000..3c5b13b --- /dev/null +++ b/volumes/README.md @@ -0,0 +1 @@ +# Do not delete this directory, it'll contain the volumes created by the containers