-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.yaml
131 lines (120 loc) · 3.1 KB
/
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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# app placement
x-app: &app
build:
context: ./backend
dockerfile: Dockerfile
target: develop
depends_on:
- mongodb
- minio
- minio_configure
volumes:
- ./backend:/opt/app
environment:
PRIVATE_KEY: ${PRIVATE_KEY}
S3_ENDPOINT: ${S3_ENDPOINT}
S3_ACCESS_KEY: ${S3_ACCESS_KEY}
S3_SECRET_KEY: ${S3_SECRET_KEY}
S3_BUCKET_NAME: ${S3_BUCKET_NAME}
S3_USE_SSL: ${S3_USE_SSL}
MONGO_SCHEME: ${MONGO_SCHEME}
MONGO_USERNAME: ${MONGO_USERNAME}
MONGO_PASSWORD: ${MONGO_PASSWORD}
MONGO_HOST: ${MONGO_HOST}
MONGO_PORT: ${MONGO_PORT}
MONGO_DATABASE_NAME: ${MONGO_DATABASE_NAME}
MAIL_SMTP_FROM: ${MAIL_SMTP_FROM}
MAIL_SMTP_USERNAME: ${MAIL_SMTP_USERNAME}
MAIL_SMTP_PASSWORD: ${MAIL_SMTP_PASSWORD}
MAIL_SMTP_HOST: ${MAIL_SMTP_HOST}
MAIL_SMTP_PORT: ${MAIL_SMTP_PORT}
NATS_URL: ${NATS_URL}
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: develop
depends_on:
- app
ports:
- "3000:3000"
volumes:
- ./frontend:/opt/app
environment:
NEXT_PUBLIC_EXTERNAL_BACKEND_BASE_URL: ${NEXT_PUBLIC_EXTERNAL_BACKEND_BASE_URL}
INTERNAL_BACKEND_BASE_URL: ${INTERNAL_BACKEND_BASE_URL}
NEXT_PUBLIC_FILES_BASE_URL: ${NEXT_PUBLIC_FILES_BASE_URL}
command: >
sh -c "npm install; npm run dev -- --hostname \"0.0.0.0\" --port 3000"
app:
<<: *app
ports:
- "8000:80"
runner:
<<: *app
volumes:
- podman-data:/tmp
ports:
- "8001:80"
command: >
sleep 3600
mongodb:
image: mongo
restart: always
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
mongodashboard:
image: mongo-express
depends_on:
- mongodb
ports:
- "8081:8081"
environment:
ME_CONFIG_BASICAUTH_USERNAME: username
ME_CONFIG_BASICAUTH_PASSWORD: password
ME_CONFIG_MONGODB_URL: ${MONGO_SCHEME}://${MONGO_USERNAME}:${MONGO_PASSWORD}@${MONGO_HOST}:${MONGO_PORT}
minio:
image: minio/minio
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: ${S3_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY}
command: ["server", "/data", "--console-address", ":9001"]
minio_configure:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
mc config host add minio http://minio:9000 ${S3_ACCESS_KEY} ${S3_SECRET_KEY};
mc mb minio/blog;"
nats:
image: nats:2.10
command: ["--jetstream", "-m", "8222", "-p", "4222"] # --config /etc/nats/nats-server.conf
ports:
- "4222:4222" # client port
- "6222:6222" # cluster post
- "8222:8222" # HTTP monitoring port
natsdashboard:
image: mdawar/nats-dashboard
ports:
- "8082:80"
podman:
image: quay.io/podman/stable
volumes:
- podman-data:/tmp
security_opt:
- label=disable
devices:
- /dev/fuse
user: podman
command: >
podman system service --time=0 unix:///tmp/podman.sock
volumes:
podman-data: