-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
95 lines (91 loc) · 2.4 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: '3'
services:
# Postgres Database
# Default credentials: postgres:postgres@postgres
postgres:
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: rayferric.xyz
PGDATA: /mount/data
image: postgres:14-alpine
expose:
- 5432
volumes:
- ./data/postgres:/mount/data
- ./data/postgres-dump:/mount/dump
restart: always # Restart on failure and system reboot
# Development Postgres Admin Console
# Authentication disabled
pgadmin:
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: root
PGADMIN_CONFIG_SERVER_MODE: 'False'
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False'
expose:
- 80
volumes:
- ./data/pgadmin:/var/lib/pgadmin
# Minio Object Storage
# Default credentials: minioadmin:minioadmin
minio:
command: server /mount/data --console-address ":9001"
image: minio/minio
expose:
- 9000 # Minio
- 9001 # Minio Console
volumes:
- ./data/minio:/mount/data
restart: always # Restart on failure and system reboot
# Development
dev:
command: yarn run next dev
depends_on:
- postgres
- pgadmin
- minio
environment:
PGHOST: postgres
PGPORT: 5432
PGDATABASE: rayferric.xyz
PGUSER: postgres
PGPASSWORD: postgres
MINIO_ENDPOINT: minio
MINIO_PORT: 9000
MINIO_ACCESS_KEY: BrgfHu7mx2c3fcvj
MINIO_SECRET_KEY: mMVjEax1UUumjLsK87haIbvtg9vEXDmD
MINIO_BUCKET: rayferric.xyz
PORT: 3000
image: node:16-alpine
ports:
- 3000:3000 # Expose to WAN (useful for testing on mobile devices in the same network)
volumes:
- ./:/app
working_dir: /app
# Production
deploy:
build:
context: .
args:
NEXT_PUBLIC_ORIGIN: https://rayferric.xyz
command: yarn run next start
depends_on:
- postgres
- minio
environment:
PGHOST: postgres
PGPORT: 5432
PGDATABASE: rayferric.xyz
PGUSER: postgres
PGPASSWORD: postgres
MINIO_ENDPOINT: minio
MINIO_PORT: 9000
MINIO_ACCESS_KEY: BrgfHu7mx2c3fcvj
MINIO_SECRET_KEY: mMVjEax1UUumjLsK87haIbvtg9vEXDmD
MINIO_BUCKET: rayferric.xyz
PORT: 3000
ports:
- 127.0.0.1:3000:3000 # Expose to localhost
restart: always # Restart on failure and system reboot