-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml.example
40 lines (40 loc) · 1.24 KB
/
docker-compose.yml.example
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
services:
db:
image: postgres
restart: unless-stopped
ports:
- 5432:5432 # change ports if you have other postgres instances running
volumes:
- ./postgres-data/:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=slightlysecurepassword123 # change this if you are stupid enough to use this app in production
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- PGDATA=/var/lib/postgresql/data/pgdata
adminer: # you should probably remove this in production
image: adminer
restart: unless-stopped
ports:
- 8081:8080
nginx:
image: nginx
restart: unless-stopped
ports:
- 8080:8080 # this is a really common port and should be changed most likely to something else
depends_on:
- app
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./public/:/usr/share/nginx/html/public
- ./data/:/usr/share/nginx/html/data
app:
build: .
restart: unless-stopped
ports:
- 8000:8000 # in busy environments you might want to change this if port 8000 is already in use
volumes:
- ./data/:/app/data
depends_on:
- db
environment:
- DATABASE_URL=postgresql://postgres:slightlysecurepassword123@db:5432/postgres