-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
57 lines (54 loc) · 1.22 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
volumes:
db:
driver: local
services:
php:
container_name: anidb
restart: unless-stopped
build:
context: ./docker
dockerfile: php.dockerfile
args:
- PHP_VERSION=8.4.2
- ALPINE_VERSION=3.21
- COMPOSER_VERSION=2.8.4
volumes:
- ./:/var/www
expose:
- "9000"
working_dir: /var/www
tty: true
nginx:
container_name: anidb-nginx
restart: unless-stopped
build:
context: ./docker
dockerfile: nginx.dockerfile
args:
- NGINX_VERSION=1.27.3
- ALPINE_VERSION=3.20
- PHP_UPSTREAM_CONTAINER=php
- PHP_UPSTREAM_PORT=9000
volumes:
- ./:/var/www
- ./docker/logs/:/var/log/nginx
- ./docker/sites/:/etc/nginx/sites-available
ports:
- "${APP_PORT:-80}:80"
expose:
- "${APP_PORT:-80}"
depends_on:
- php
db:
container_name: anidb-pgsql
image: postgres:17.2-alpine3.21
restart: unless-stopped
tty: true
environment:
- POSTGRES_USER=${DB_USERNAME:-postgres}
- POSTGRES_PASSWORD=${DB_PASSWORD:-postgres}
- POSTGRES_DB=${DB_DATABASE:-anidb}
ports:
- '${DB_PORT:-5432}:5432'
volumes:
- db:/var/lib/postgresql/data