-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
73 lines (68 loc) · 1.59 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
version: '3'
services:
mysql-db:
container_name: msg-mysql
image: mysql:8.4.0
restart: unless-stopped
env_file:
- ./server/.env.production
volumes:
- mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
MYSQL_USER: $MYSQL_USER
MYSQL_PASSWORD: $MYSQL_PASSWORD
MYSQL_DATABASE: $MYSQL_DATABASE
ports:
- $MYSQL_LOCAL_PORT:$MYSQL_DOCKER_PORT
nestjs-app:
container_name: msg-server
image: ghcr.io/plinom/nest-server:0.0.1
env_file:
- ./server/.env.production
build:
context: ./server/
target: production
restart: unless-stopped
environment:
NODE_ENV: production
ports:
- $NESTJS_APP_LOCAL_PORT:$NESTJS_APP_DOCKER_PORT
stdin_open: true
tty: true
depends_on:
- mysql-db
nextjs-app:
container_name: msg-client
image: ghcr.io/plinom/nest-client:0.0.1
env_file:
- ./client/.env.production
build:
context: ./client/
target: runner
restart: unless-stopped
ports:
- $NEXTJS_APP_LOCAL_PORT:$NEXTJS_APP_DOCKER_PORT
stdin_open: true
tty: true
depends_on:
- nestjs-app
redis:
container_name: msg-redis
image: redis:latest
volumes:
- redis:/var/lib/redis
env_file:
- ./server/.env.production
environment:
REDIS_PASSWORD: $REDIS_PASSWORD
REDIS_USER: $REDIS_USER
REDIS_USER_PASSWORD: $REDIS_USER_PASSWORD
ports:
- $REDIS_LOCAL_PORT:$REDIS_DOCKER_PORT
restart: unless-stopped
tty: true
stdin_open: true
volumes:
mysql:
redis: