Expand description
§Rust
Запуск программ на rust в контейнерах docker
§Бекенд
services:
backend:
command: ./backend
container_name: backend
depends_on:
redis:
condition: service_healthy
restart: true
loki:
condition: service_healthy
restart: true
hostname: backend
image: ubuntu:noble
networks:
- network_internal
environment:
- RUST_LOG=info
profiles:
- target
volumes:
- ./backend:/backend
- ./.env:/.env
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
network_internal:
§cmp_leptos
docker-compose.yml:
services:
frontend:
container_name: frontend
hostname: frontend
image: nginx
networks:
- network_internal
ports:
- "8000:80"
profiles:
- target
volumes:
- ./frontend/dist:/usr/share/nginx/html
- ./frontend/nginx.conf:/etc/nginx/conf.d/default.conf
networks:
network_internal:
# TODO - healtcheck
nginx.conf:
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html =404;
}
}