Skip to content

Commit 6ba0221

Browse files
committed
Add Dockerfile for backend
1 parent 473ce90 commit 6ba0221

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./.gitignore

Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM rust:1.20-stretch
2+
3+
RUN apt-get update \
4+
&& apt-get install -y postgresql cmake \
5+
&& rm -rf /var/lib/apt/lists/* \
6+
&& cargo install diesel_cli --no-default-features --features postgres
7+
8+
WORKDIR /app
9+
COPY . /app
10+
11+
ENTRYPOINT ["/app/docker_entrypoint.sh"]

docker_entrypoint.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
diesel migration run
4+
./script/init-local-index.sh
5+
6+
cargo run --bin server

0 commit comments

Comments
 (0)