-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.prod.yml
52 lines (52 loc) · 1.28 KB
/
docker-compose.prod.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
services:
http:
image: nginx:1.25
restart: always
ports:
- '80:80'
volumes:
- './:/app/'
- './docker/nginx/nginx.conf:/etc/nginx/nginx.conf'
depends_on:
- php
php:
build:
context: ./docker/php/
dockerfile: prod.Dockerfile
restart: always
volumes:
- ./:/app/
working_dir: /app/
depends_on:
- pgsql
node:
image: node:20
volumes:
- ./:/app/
working_dir: /app/
command: "npm run build"
# mariadb:
# image: mariadb:11
# ports:
# - 3306:3306
# environment:
# MARIADB_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
# MARIADB_DATABASE: "${DB_DATABASE}"
# MARIADB_USER: "${DB_USERNAME}"
# MARIADB_PASSWORD: "${DB_PASSWORD}"
# volumes:
# - ./docker/mariadb/datas:/var/lib/mysql
pgsql:
image: postgres:17
restart: always
ports:
- '${FORWARD_DB_PORT:-5432}:5432'
environment:
PGPASSWORD: '${DB_PASSWORD:-secret}'
POSTGRES_DB: '${DB_DATABASE:-laravel}'
POSTGRES_USER: '${DB_USERNAME:-laravel}'
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
volumes:
- 'pgsql:/var/lib/postgresql/data'
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "${DB_DATABASE:-laravel}", "-U", "${DB_USERNAME:-laravel}" ]