+23
@@ -0,0 +1,23 @@
|
|||||||
|
FROM alpine:3.21.3 AS builder
|
||||||
|
|
||||||
|
COPY . /Oxicloud
|
||||||
|
|
||||||
|
WORKDIR /Oxicloud
|
||||||
|
|
||||||
|
RUN apk update && \
|
||||||
|
apk add cargo pkgconfig openssl-dev
|
||||||
|
|
||||||
|
RUN cargo build --release
|
||||||
|
|
||||||
|
# /Oxicloud/target/release/oxicloud
|
||||||
|
|
||||||
|
FROM alpine:3.21.3
|
||||||
|
|
||||||
|
COPY . /Oxicloud
|
||||||
|
|
||||||
|
COPY --from=builder /Oxicloud/target/release/ /Oxicloud
|
||||||
|
COPY --from=builder /usr/lib/libgcc_s.so.1 /usr/lib/libgcc_s.so.1
|
||||||
|
|
||||||
|
WORKDIR /Oxicloud
|
||||||
|
|
||||||
|
CMD ["./oxicloud","--release"]
|
||||||
+24
-2
@@ -6,8 +6,10 @@ services:
|
|||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
POSTGRES_DB: oxicloud
|
POSTGRES_DB: oxicloud
|
||||||
ports:
|
# ports:
|
||||||
- "5432:5432"
|
# - "5432:5432"
|
||||||
|
networks:
|
||||||
|
- oxicloud
|
||||||
volumes:
|
volumes:
|
||||||
- pg_data:/var/lib/postgresql/data
|
- pg_data:/var/lib/postgresql/data
|
||||||
- ./db/schema.sql:/docker-entrypoint-initdb.d/10-schema.sql
|
- ./db/schema.sql:/docker-entrypoint-initdb.d/10-schema.sql
|
||||||
@@ -17,5 +19,25 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
|
oxicloud:
|
||||||
|
image: oxicloud
|
||||||
|
restart: always
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
ports:
|
||||||
|
- "8086:8086"
|
||||||
|
- "8085:8085"
|
||||||
|
networks:
|
||||||
|
- oxicloud
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
environment:
|
||||||
|
- "OXICLOUD_DB_CONNECTION_STRING=postgres://postgres:postgres@postgres/oxicloud"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
oxicloud:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pg_data:
|
pg_data:
|
||||||
|
|||||||
+1
-1
@@ -678,7 +678,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start server with clear message
|
// Start server with clear message
|
||||||
let addr = SocketAddr::from(([127, 0, 0, 1], 8086));
|
let addr = SocketAddr::from(([0, 0, 0, 0], 8086));
|
||||||
tracing::info!("Starting OxiCloud server on http://{}", addr);
|
tracing::info!("Starting OxiCloud server on http://{}", addr);
|
||||||
|
|
||||||
// Start the server
|
// Start the server
|
||||||
|
|||||||
Reference in New Issue
Block a user