Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sample compose file and Dockerfile for deployment
- Loading branch information
1 parent
ac63162
commit e5cdb28
Showing
5 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
docs | ||
data | ||
Dockerfile | ||
docker-compose.yml | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM rust:1-stretch | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
gettext \ | ||
postgresql-client \ | ||
libpq-dev \ | ||
git \ | ||
curl \ | ||
gcc \ | ||
make \ | ||
openssl \ | ||
libssl-dev | ||
WORKDIR /app | ||
COPY Cargo.toml Cargo.lock ./ | ||
RUN cargo install diesel_cli --no-default-features --features postgres --version '=1.2.0' | ||
COPY . . | ||
RUN cargo build | ||
RUN rm -rf target/debug/incremental | ||
CMD ["cargo", "run"] | ||
EXPOSE 7878 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: '3' | ||
|
||
services: | ||
postgres: | ||
image: postgres:10.5 | ||
env_file: .env | ||
restart: unless-stopped | ||
volumes: | ||
- "./data/postgres:/var/lib/postgresql/data" | ||
plume: | ||
build: . | ||
env_file: .env | ||
restart: unless-stopped | ||
volumes: | ||
- "./data/plume/static/media:/app/media" | ||
- "./.env:/app/.env" | ||
ports: | ||
- "127.0.0.1:7878:7878" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
BASE_URL=yourdomain.com | ||
# generate one with openssl rand -base64 45 | ||
ROCKET_SECRET_KEY=randomstringhere | ||
|
||
# you can safely leave those defaults | ||
POSTGRES_USER=plume | ||
POSTGRES_PASSWORD=plume | ||
DB_URL=postgres://plume:plume@postgres:5432/plume | ||
DATABASE_URL=postgres://plume:plume@postgres:5432/plume | ||
USE_HTTPS=1 | ||
ROCKET_ADDRESS=0.0.0.0 | ||
ROCKET_PORT=7878 |