update Config.toml
This commit is contained in:
@@ -7,6 +7,8 @@ variables:
|
||||
BUILD_NAME: "rust/storage"
|
||||
SERVICE_NAME: "storage"
|
||||
IMAGE_TAG: "dev"
|
||||
SERVICE_PORT: 8080
|
||||
PROXY_PORT: 9002
|
||||
|
||||
generate_image_dev:
|
||||
stage: generate_image
|
||||
@@ -30,7 +32,7 @@ deploy_dev:
|
||||
- if [[ -n "$CONTAINER_NAME" ]]; then
|
||||
docker rm -f $CONTAINER_NAME;
|
||||
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:
|
||||
- '001'
|
||||
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"
|
||||
rust-s3 ={version = "0.33.0" }
|
||||
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
|
||||
ENV MINIO_REGION ""
|
||||
ENV MINIO_ENDPOINT http://192.168.1.100:9000
|
||||
ENV MINIO_ACCESS_KEY sTkzoRR9lQUmI5Hp
|
||||
ENV MINIO_SECRET_KEY oDUG9GRlkNv3V76bVGjovp9228bP25WC
|
||||
ENV MINIO_ACCESS_KEY pmkSLk5WwyUViV9OxgNg
|
||||
ENV MINIO_SECRET_KEY 17UxEQZZhNGQmroc4tItq8POlfCATW5Ni3IGljif
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y 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::web::Json;
|
||||
use bytes::Bytes;
|
||||
use dotenv::dotenv;
|
||||
use serde::Serialize;
|
||||
|
||||
mod mods;
|
||||
@@ -127,6 +128,7 @@ async fn delete_file(path: web::Path<(String, String)>) -> impl Responder {
|
||||
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
dotenv().expect("No env!");
|
||||
HttpServer::new(|| {
|
||||
let cors = Cors::permissive();
|
||||
App::new()
|
||||
|
Reference in New Issue
Block a user