start
This commit is contained in:
49
docker-compose.yml
Normal file
49
docker-compose.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
services:
|
||||
#bot:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: Dockerfile.bot
|
||||
# container_name: telegram_bot
|
||||
# restart: no
|
||||
# env_file:
|
||||
# - .env
|
||||
# environment:
|
||||
# - BOT_TOKEN=${BOT_TOKEN}
|
||||
# command: python -m bot.main
|
||||
# depends_on:
|
||||
# - db
|
||||
# volumes:
|
||||
# - .:/app
|
||||
|
||||
api:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.api
|
||||
container_name: vpn_api
|
||||
restart: no
|
||||
env_file:
|
||||
- .env
|
||||
command: uvicorn api.main:app --host 0.0.0.0 --port 8000
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- .:/app
|
||||
|
||||
db:
|
||||
image: postgres:15-alpine
|
||||
container_name: bot_db
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: ${DB_USER}
|
||||
POSTGRES_PASSWORD: ${DB_PASS}
|
||||
POSTGRES_DB: ${DB_NAME}
|
||||
volumes:
|
||||
- ./pg_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5433:5432"
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
Reference in New Issue
Block a user