I'm deploying services to GCP and I want to persist the database and logs.
The VM's local storage is not considered.
How can I mount the GCP disk/bucket to the containers?
Here is my docker-compose.yml
:
version: '3'
services:
backend:
image: mybackend:latest
volumes:
- logs-data:/path/to/logs
database:
image: postgres:12.6-alpine
volumes:
- db-data:/var/lib/postgresql/data
- logs-data:/var/log/postgresql
volumes:
db-data:
driver: ??
driver_opts: ??
logs-data:
driver: ??
driver_opts: ??
The gcePersistentDisk
is for Kubernetes only.