-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
70 lines (65 loc) · 1.33 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
version: "3.9"
services:
nginx:
container_name: a50-nginx
build:
context: docker/nginx
ports:
- "8081:80"
volumes:
- ./:/app
depends_on:
- php-fpm
php-fpm:
container_name: a50-php-fpm
build:
context: docker/php-fpm
environment:
APP_ENV: ${APP_ENV}
DB_HOST: ${DB_HOST}
DB_USER: ${DB_USERNAME}
DB_PASSWORD_FILE: /run/secrets/db_password
DB_NAME: ${DB_NAME}
volumes:
- ./:/app
secrets:
- db_password
env_file:
- .env
php-cli:
container_name: a50-php-cli
build:
context: docker/php-cli
environment:
APP_ENV: ${APP_ENV}
DB_HOST: ${DB_HOST}
DB_USER: ${DB_USERNAME}
DB_PASSWORD_FILE: /run/secrets/db_password
DB_NAME: ${DB_NAME}
volumes:
- ./:/app
secrets:
- db_password
env_file:
- .env
database:
container_name: a50-${DB_HOST}
hostname: ${DB_HOST}
image: postgres:15-alpine
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
POSTGRES_DB: ${DB_NAME}
volumes:
- database:/var/lib/postgresql/data
secrets:
- db_password
ports:
- "65432:5432"
env_file:
- .env
volumes:
database:
secrets:
db_password:
file: ./docker/secrets/db_password