services: postgres: image: postgres:alpine restart: always ports: - "5432:5432" deploy: mode: replicated replicas: 1 environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: example POSTGRES_DB: howmuch volumes: - ../../db_data_howmuch/postgres/:/var/lib/postgresql/data adminer: image: adminer restart: always ports: - 8080:8080 redis: image: redis:alpine restart: always ports: - "6379:6379" deploy: mode: replicated replicas: 1 command: redis-server --save 20 1 --loglevel warning volumes: - ../../db_data_howmuch/redis/:/data