forked from FerretDB/example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (48 loc) · 1.13 KB
/
docker-compose.yml
File metadata and controls
48 lines (48 loc) · 1.13 KB
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
version: "3"
services:
client:
build: ./app/client
hostname: 'todo_client'
container_name: 'todo_client'
stdin_open: true
api:
build: ./app/api
hostname: 'todo_api'
container_name: 'todo_api'
nginx:
image: nginx
hostname: 'nginx'
container_name: 'nginx'
ports:
- 8888:8888
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
postgres:
image: postgres:14.0
hostname: 'postgres'
container_name: 'postgres'
ports:
- 5432:5432
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_DB=ferretdb
ferretdb:
image: ghcr.io/ferretdb/ferretdb:latest
hostname: 'ferretdb'
container_name: 'ferretdb'
restart: 'on-failure'
command:
[
'-listen-addr=:27017',
'-postgresql-url=postgres://postgres@postgres:5432/ferretdb',
]
ports:
- 27017:27017
setup:
image: postgres:14.0
hostname: 'setup'
container_name: 'setup'
restart: 'on-failure'
depends_on:
- 'postgres'
entrypoint: ["sh", "-c", "psql -h postgres -U postgres -d ferretdb -c 'CREATE SCHEMA IF NOT EXISTS todo'"]