first commit
This commit is contained in:
39
docker-compose.yml
Normal file
39
docker-compose.yml
Normal file
@ -0,0 +1,39 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
server:
|
||||
build:
|
||||
context: ./server
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8000:8000"
|
||||
# expose:
|
||||
# - "8000"
|
||||
networks:
|
||||
- weather-net
|
||||
environment:
|
||||
- DATABASE_URL=postgresql+asyncpg://weather_user:weather_pass@db:5432/weather
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: postgres:16
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: weather_user
|
||||
POSTGRES_PASSWORD: weather_pass
|
||||
POSTGRES_DB: weather
|
||||
ports:
|
||||
- "5432:5432"
|
||||
networks:
|
||||
- weather-net
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
|
||||
networks:
|
||||
weather-net:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
|
Reference in New Issue
Block a user