-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
65 lines (60 loc) · 1.05 KB
/
docker-compose.yaml
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
version: '3'
services:
# Nginx
webserver:
image: nginx:1.19-alpine
container_name: webserver
restart: unless-stopped
tty: true
ports:
- "80:80"
- "443:443"
volumes:
- ./:/var/www:cached
- ./nginx/conf.d:/etc/nginx/conf.d
depends_on:
- postgres
networks:
- my-net
# Laravel application
app:
build:
context: .
dockerfile: Dockerfile
image: lucaprete/laravel-on-docker
container_name: app
restart: unless-stopped
tty: true
ports:
- "9000:9000"
volumes:
- .:/var/www:cached
tmpfs:
- /var/www/storage/logs
env_file:
- .env
depends_on:
- postgres
networks:
- my-net
# Postgres
postgres:
image: postgres:12.3-alpine
container_name: postgres
volumes:
- dbdata:/var/lib/postgresql/data
restart: unless-stopped
tty: true
ports:
- "5432:5432"
env_file:
- .env
networks:
- my-net
# Volumes
volumes:
dbdata:
# Networks
networks:
my-net:
driver: bridge