update Config.toml
This commit is contained in:
@@ -7,6 +7,8 @@ variables:
|
|||||||
BUILD_NAME: "rust/storage"
|
BUILD_NAME: "rust/storage"
|
||||||
SERVICE_NAME: "storage"
|
SERVICE_NAME: "storage"
|
||||||
IMAGE_TAG: "dev"
|
IMAGE_TAG: "dev"
|
||||||
|
SERVICE_PORT: 8080
|
||||||
|
PROXY_PORT: 9002
|
||||||
|
|
||||||
generate_image_dev:
|
generate_image_dev:
|
||||||
stage: generate_image
|
stage: generate_image
|
||||||
@@ -30,7 +32,7 @@ deploy_dev:
|
|||||||
- if [[ -n "$CONTAINER_NAME" ]]; then
|
- if [[ -n "$CONTAINER_NAME" ]]; then
|
||||||
docker rm -f $CONTAINER_NAME;
|
docker rm -f $CONTAINER_NAME;
|
||||||
fi
|
fi
|
||||||
- docker run -d --name $SERVICE_NAME $BUILD_NAME:$IMAGE_TAG
|
- docker run -d --name $SERVICE_NAME -p $PROXY_PORT:$SERVICE_PORT $BUILD_NAME:$IMAGE_TAG
|
||||||
tags:
|
tags:
|
||||||
- '001'
|
- '001'
|
||||||
only:
|
only:
|
||||||
|
2198
Cargo.lock
generated
2198
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -11,4 +11,5 @@ actix-web = "4.4.1"
|
|||||||
actix-cors = "0.7.0"
|
actix-cors = "0.7.0"
|
||||||
rust-s3 ={version = "0.33.0" }
|
rust-s3 ={version = "0.33.0" }
|
||||||
tokio = { version = "1.0.0", features = ["rt", "rt-multi-thread", "macros"] }
|
tokio = { version = "1.0.0", features = ["rt", "rt-multi-thread", "macros"] }
|
||||||
serde = "1.0.195"
|
serde = "1.0.195"
|
||||||
|
dotenv = "0.15.0"
|
@@ -15,8 +15,8 @@ RUN cargo install --path . --color always
|
|||||||
FROM ubuntu:latest
|
FROM ubuntu:latest
|
||||||
ENV MINIO_REGION ""
|
ENV MINIO_REGION ""
|
||||||
ENV MINIO_ENDPOINT http://192.168.1.100:9000
|
ENV MINIO_ENDPOINT http://192.168.1.100:9000
|
||||||
ENV MINIO_ACCESS_KEY sTkzoRR9lQUmI5Hp
|
ENV MINIO_ACCESS_KEY pmkSLk5WwyUViV9OxgNg
|
||||||
ENV MINIO_SECRET_KEY oDUG9GRlkNv3V76bVGjovp9228bP25WC
|
ENV MINIO_SECRET_KEY 17UxEQZZhNGQmroc4tItq8POlfCATW5Ni3IGljif
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y ca-certificates
|
RUN apt-get install -y ca-certificates
|
||||||
RUN update-ca-certificates
|
RUN update-ca-certificates
|
||||||
|
4
src/.env
Normal file
4
src/.env
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
MINIO_REGION=
|
||||||
|
MINIO_ENDPOINT=http://192.168.1.100:9000
|
||||||
|
MINIO_ACCESS_KEY=8hp6291qwQdfL1PKVHea
|
||||||
|
MINIO_SECRET_KEY=4fRjSnkoph2azfHnJVCETjAej6UXpCfd4JKnlNe3
|
@@ -4,6 +4,7 @@ use actix_web::{App, HttpServer, Responder, get, put, post, delete, web, Customi
|
|||||||
use actix_web::http::StatusCode;
|
use actix_web::http::StatusCode;
|
||||||
use actix_web::web::Json;
|
use actix_web::web::Json;
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
|
use dotenv::dotenv;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
mod mods;
|
mod mods;
|
||||||
@@ -127,6 +128,7 @@ async fn delete_file(path: web::Path<(String, String)>) -> impl Responder {
|
|||||||
|
|
||||||
#[actix_web::main]
|
#[actix_web::main]
|
||||||
async fn main() -> std::io::Result<()> {
|
async fn main() -> std::io::Result<()> {
|
||||||
|
dotenv().expect("No env!");
|
||||||
HttpServer::new(|| {
|
HttpServer::new(|| {
|
||||||
let cors = Cors::permissive();
|
let cors = Cors::permissive();
|
||||||
App::new()
|
App::new()
|
||||||
|
Reference in New Issue
Block a user