mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-17 05:21:07 +00:00
commit
162eed786d
2 changed files with 50 additions and 0 deletions
12
Dockerfile
Normal file
12
Dockerfile
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
FROM rust:latest
|
||||
|
||||
ENV ROCKET_ADDRESS=0.0.0.0
|
||||
ENV ROCKET_PORT=8000
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN cargo install cargo-watch
|
||||
|
||||
COPY ./ ./
|
||||
|
||||
RUN cargo build
|
||||
38
docker-compose.yml
Normal file
38
docker-compose.yml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: ./
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
|
||||
ports:
|
||||
- "9000:8000"
|
||||
command: sh -c "cargo watch -x run"
|
||||
volumes:
|
||||
- ./:/app
|
||||
networks:
|
||||
- db
|
||||
adminer:
|
||||
image: adminer:latest
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- 9002:8080
|
||||
networks:
|
||||
- db
|
||||
db:
|
||||
image: "postgres:15"
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: postgres
|
||||
ports:
|
||||
- "9001:5432"
|
||||
networks:
|
||||
- db
|
||||
|
||||
networks:
|
||||
db:
|
||||
Loading…
Reference in a new issue