mirror of
https://github.com/e621ng/autocompleted.git
synced 2025-03-04 03:03:02 -05:00
Add docker
This commit is contained in:
parent
067b6c708e
commit
2ce17caac4
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@ -0,0 +1,2 @@
|
||||
.env
|
||||
/target
|
12
.env.sample
12
.env.sample
@ -1,7 +1,7 @@
|
||||
SERVER_ADDR=
|
||||
PG.USER=
|
||||
PG.PASSWORD=
|
||||
PG.HOST=
|
||||
PG.PORT=
|
||||
PG.DBNAME=
|
||||
PG.POOL.MAX_SIZE=
|
||||
PG__USER=
|
||||
PG__PASSWORD=
|
||||
PG__HOST=
|
||||
PG__PORT=
|
||||
PG__DBNAME=
|
||||
PG__POOL__MAX_SIZE=
|
||||
|
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM rust:1.68-alpine3.17 as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache musl-dev
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse cargo build --release
|
||||
|
||||
FROM alpine:3.17
|
||||
|
||||
COPY --from=builder /app/target/release/autocompleted /app/autocompleted
|
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
@ -0,0 +1,16 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
autocompleted:
|
||||
restart: always
|
||||
network_mode: host
|
||||
command: /app/autocompleted
|
||||
build: .
|
||||
environment:
|
||||
SERVER_ADDR: ${SERVER_ADDR}
|
||||
PG__USER: ${PG__USER}
|
||||
PG__PASSWORD: ${PG__PASSWORD}
|
||||
PG__HOST: ${PG__HOST}
|
||||
PG__PORT: ${PG__PORT}
|
||||
PG__DBNAME: ${PG__DBNAME}
|
||||
PG__POOL__MAX_SIZE: ${PG__POOL__MAX_SIZE}
|
Loading…
Reference in New Issue
Block a user