-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
49 lines (44 loc) · 1.05 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
version: '3.8'
networks:
fsharer:
services:
db:
image: postgres
restart: unless-stopped
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
POSTGRES_DB: files
volumes:
- ./postgres-data:/var/lib/postgresql/data #make the postgres-data directory
- ./psql-init:/docker-entrypoint-initdb.d:ro
networks:
- fsharer
backend:
build:
dockerfile: ./Dockerfile
context: ./fsharerbackend
restart: unless-stopped
volumes:
- ./storage:/app/storage #Change to where you want your files to be stored
networks:
- fsharer
ports:
- "127.0.0.1:3001:3001"
environment:
PORT: 3001
DB_HOST: db
DB_USER: postgres
DB_PASS: password
DB_NAME: files
STORAGE_LOC: /app/storage
NAME_LENGTH: 4 #Length of filename, 36^NAME_LENGTH files can be stored
depends_on:
- db
frontend:
restart: unless-stopped
build:
dockerfile: ./Dockerfile
context: ./fsharer
ports:
- "127.0.0.1:3000:3000"