mirror of
https://github.com/coaidev/coai.git
synced 2025-06-02 03:40:18 +09:00
feat: update docker compose
This commit is contained in:
parent
b28d25c988
commit
716b184475
@ -48,7 +48,7 @@ RUN cd /app && \
|
|||||||
rm -rf node_modules
|
rm -rf node_modules
|
||||||
|
|
||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 80
|
EXPOSE 8000
|
||||||
|
|
||||||
# Start nginx
|
# Start nginx
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
45
docker-compose.yaml
Normal file
45
docker-compose.yaml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:latest
|
||||||
|
container_name: db
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: root
|
||||||
|
MYSQL_DATABASE: chatnio
|
||||||
|
MYSQL_USER: chatnio
|
||||||
|
MYSQL_PASSWORD: chatnio123456!
|
||||||
|
ports:
|
||||||
|
- "3306:3306"
|
||||||
|
volumes:
|
||||||
|
- ./db:/var/lib/mysql
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:latest
|
||||||
|
container_name: redis
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "6379:6379"
|
||||||
|
|
||||||
|
chatnio:
|
||||||
|
build: .
|
||||||
|
container_name: chatnio
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
depends_on:
|
||||||
|
- mysql
|
||||||
|
- redis
|
||||||
|
links:
|
||||||
|
- mysql
|
||||||
|
- redis
|
||||||
|
environment:
|
||||||
|
MYSQL_HOST: mysql
|
||||||
|
MYSQL_USER: chatnio
|
||||||
|
MYSQL_PASSWORD: chatnio123456!
|
||||||
|
MYSQL_DATABASE: chatnio
|
||||||
|
REDIS_HOST: redis
|
||||||
|
REDIS_PORT: 6379
|
||||||
|
REDIS_PASSWORD: ""
|
||||||
|
REDIS_DB: 0
|
||||||
|
DEBUG: false
|
@ -8,8 +8,10 @@ events {
|
|||||||
|
|
||||||
http {
|
http {
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 8000 default_server;
|
||||||
server_name localhost;
|
listen [::]:8000 default_server;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
root /app/dist;
|
root /app/dist;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user