-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (57 loc) · 1.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
63 lines (57 loc) · 1.2 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: '3.8'
services:
# The Traffic Controller (Front Door)
proxy:
image: nginx:alpine
container_name: gop_proxy
ports:
- "8080:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- web
- api
networks:
- green-net
# PHP API
api:
build: ./backend
container_name: gop_api
environment:
DB_HOST: db
DB_NAME: onlus_merch
DB_USER: green_admin
DB_PASS: safe_password_123
networks:
- green-net
# React + TS (Vite)
web:
build: ./frontend
container_name: gop_web
# IMPORTANT: We removed the ports: - "5173:5173" section!
volumes:
- ./frontend:/app
- /app/node_modules
environment:
- CHOKIDAR_USEPOLLING=true
- VITE_PORT=5173
networks:
- green-net
# Database
db:
image: postgres:15-alpine
container_name: gop_db
environment:
POSTGRES_USER: green_admin
POSTGRES_PASSWORD: safe_password_123
POSTGRES_DB: onlus_merch
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- pgdata:/var/lib/postgresql/data
networks:
- green-net
networks:
green-net:
driver: bridge
volumes:
pgdata: