diff --git a/Makefile b/Makefile deleted file mode 100644 index 297b5ba..0000000 --- a/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -build: - docker-compose -f docker-compose.yml build $(c) -up: - docker-compose -f docker-compose.yml up -d $(c) -down: - docker-compose -f docker-compose.yml down $(c) -stop: - docker-compose -f docker-compose.yml stop $(c) -logs: - docker-compose -f docker-compose.yml logs --tail=100 -f $(c) -migrate: - docker-compose -f docker-compose.yml run api npm run db:migrate:force -seed: - docker-compose -f docker-compose.yml run api npm run db:seed \ No newline at end of file diff --git a/README.md b/README.md index a6fa9e9..c96a6ef 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ -# About API +# educt-server -... +_This service is part of [Educt](https://github.com/sergeyyarkov/educt) which contains API application._ + + diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 3edfc60..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,97 +0,0 @@ -version: '3.8' - -services: - nginx: - container_name: nginx - restart: always - image: nginx:latest - volumes: - - ./nginx/default.conf:/etc/nginx/conf.d/default.conf - ports: - - 80:80 - depends_on: - - api - networks: - - app-network - client: - container_name: client - restart: always - image: educt-client - ports: - - 5000:80 - depends_on: - - api - networks: - - app-network - api: - container_name: api - restart: always - build: - context: . - target: production - dockerfile: Dockerfile - ports: - - ${PORT}:${PORT} - environment: - - PORT=3333 - - APP_KEY=IP387l45rlNO3t7Qgjd89qr-a2G4oUgz - - DB_CONNECTION=pg - - PG_HOST=postgres - - PG_PORT=5432 - - PG_USER=postgres - - PG_PASSWORD=1234 - - PG_DB_NAME=educt - - REDIS_CONNECTION=local - - REDIS_HOST=redis - - REDIS_PORT=6379 - - REDIS_PASSWORD= - - SMTP_HOST=localhost - - SMTP_PORT=587 - - SMTP_USERNAME= - - SMTP_PASSWORD= - - MAILGUN_API_KEY= - - MAILGUN_DOMAIN= - - CACHE_VIEWS=false - - DRIVE_DISK=local - - S3_KEY= - - S3_SECRET= - - S3_BUCKET= - - S3_REGION= - volumes: - - uploads:/home/node/app/uploads - command: ['dumb-init', 'node', 'server.js'] - depends_on: - - postgres - networks: - - app-network - postgres: - container_name: postgres - image: postgres:14 - volumes: - - postgres_volume:/var/lib/postgresql/data - environment: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: 1234 - POSTGRES_DB: educt - ports: - - 5432:5432 - networks: - - app-network - redis: - container_name: redis - image: redis:6-alpine - volumes: - - redis_volume:/data - ports: - - 6379:6379 - networks: - - app-network - depends_on: - - postgres -volumes: - postgres_volume: - redis_volume: - uploads: -networks: - app-network: - driver: bridge diff --git a/nginx/default.conf b/nginx/default.conf deleted file mode 100644 index 8a1856e..0000000 --- a/nginx/default.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - listen 80; - - server_name localhost; - - location / { - proxy_pass http://client:80; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_cache_bypass $http_upgrade; - } - - location /api { - proxy_pass http://api:3333; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_cache_bypass $http_upgrade; - } -}