-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
45 lines (42 loc) · 1 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
services:
database:
container_name: database
restart: unless-stopped
env_file: .env
image: postgres:16
healthcheck:
test: ['CMD', 'pg_isready', '-U', '${ADMINUSER}']
environment:
POSTGRES_USER: ${ADMINUSER}
POSTGRES_PASSWORD: ${ADMINPASSWORD}
POSTGRES_DB: ${STRAPIDATABASENAME}
volumes:
- cms-data:/var/lib/postgresql/data/
ports:
- '5432:5432'
networks:
- strapi
init-database:
container_name: init-database
build:
dockerfile: Dockerfile.database
context: .
env_file: .env
environment:
ADMINUSER: ${ADMINUSER}
ADMINPASSWORD: ${ADMINPASSWORD}
SERVER: database
STRAPIUSER: ${STRAPIUSER}
STRAPIPASSWORD: ${STRAPIPASSWORD}
STRAPIDATABASENAME: ${STRAPIDATABASENAME}
networks:
- strapi
depends_on:
database:
condition: service_healthy
volumes:
cms-data:
networks:
strapi:
name: strapi
driver: bridge