Skip to content

Commit

Permalink
[CYB-141] Смена сервера
Browse files Browse the repository at this point in the history
  • Loading branch information
mrNote23 committed Sep 16, 2023
1 parent 163bf57 commit 3798ead
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 35,517 deletions.
4 changes: 2 additions & 2 deletions dclear.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker stop cyb-client cyb-server
docker rm cyb-client cyb-server
docker images
85 changes: 31 additions & 54 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,35 @@
version: '3.3'

services:
nginx:
container_name: cyb-nginx
image: cyb-nginx
build: ./nginx
restart: always
volumes:
- ./ssl:/ssl
- ./ssl/certbot/conf:/etc/letsencrypt
- ./ssl/certbot/www:/var/www/certbot
links:
- client:client
- server:server
# - pgadmin:pgadmin
ports:
- "80:80"
- "443:443"
networks:
- cyb-net
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
depends_on:
- client
- server
- postgres
# - pgadmin

certbot:
image: certbot/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
- ./ssl/certbot/conf:/etc/letsencrypt
- ./ssl/certbot/www:/var/www/certbot
# nginx:
# container_name: cyb-nginx
# image: cyb-nginx
# build: ./nginx
# restart: always
# volumes:
# - ./ssl:/ssl
# - ./ssl/certbot/conf:/etc/letsencrypt
# - ./ssl/certbot/www:/var/www/certbot
# links:
# - client:client
# - server:server
# ports:
# - "80:80"
# - "443:443"
# networks:
# - cyb-net
# command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
# depends_on:
# - client
# - server
# - postgres
#
# certbot:
# image: certbot/certbot
# entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
# volumes:
# - ./ssl/certbot/conf:/etc/letsencrypt
# - ./ssl/certbot/www:/var/www/certbot

client:
container_name: cyb-client
Expand All @@ -46,7 +44,7 @@ services:
args:
CLIENT_PORT: ${CLIENT_PORT}
ports:
- '${CLIENT_PORT}:${CLIENT_PORT}'
- '5200:${CLIENT_PORT}'
env_file:
- .env
environment:
Expand All @@ -68,7 +66,7 @@ services:
args:
SERVER_PORT: ${SERVER_PORT}
ports:
- '${SERVER_PORT}:${SERVER_PORT}'
- '5201:${SERVER_PORT}'
env_file:
- .env
environment:
Expand All @@ -95,27 +93,6 @@ services:
volumes:
- ./tmp/pgdata:/var/lib/postgresql/data/

# не нужен, но может пригодиться
# pgadmin:
# container_name: cyb-pgadmin
# image: dpage/pgadmin4
# user: root
# networks:
# - cyb-net
# restart: always
# ports:
# - '${PGADMIN_LISTEN_PORT}:${PGADMIN_LISTEN_PORT}'
# env_file:
# - .env
# environment:
# PGADMIN_CONFIG_CONSOLE_LOG_LEVEL: 0
# volumes:
# - ./tmp/pgadmin:/var/lib/pgadmin
# - ./ssl/cert.pem:/certs/server.cert
# - ./ssl/privkey.pem:/certs/server.key
# depends_on:
# - postgres

networks:
cyb-net:
driver: bridge
Loading

0 comments on commit 3798ead

Please sign in to comment.