-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (50 loc) · 1.25 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
version: "3"
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
USER_UID: 1000
USER_GID: 1000
VARIANT: 16
init: true
volumes:
- /var/run/docker.sock:/var/run/docker-host.sock
- ..:/workspace:cached
entrypoint: /usr/local/share/docker-init.sh
command: sleep infinity
environment:
DATABASE_HOST: pg
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: AzureRocks
DATABASE_NAME: blog
links:
- pg
- cosmos
cosmos:
container_name: cosmos-contoso-real-estate
image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
mem_limit: 3g
cpu_count: 2
environment:
AZURE_COSMOS_EMULATOR_PARTITION_COUNT: 10
AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE: "true"
volumes:
# Forwards the local Docker socket to the container.
- /var/run/docker.sock:/var/run/docker-host.sock
pg:
image: postgres:latest
restart: always
environment:
POSTGRES_PASSWORD: AzureRocks
POSTGRES_DB: blog
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
volumes:
pgdata: