diff --git a/devserver/.awsrc b/devserver/.awsrc new file mode 100644 index 0000000..8f9ac69 --- /dev/null +++ b/devserver/.awsrc @@ -0,0 +1,4 @@ +export AWS_SECRET_ACCESS_KEY=b6d1c8ec97052b8a40ae953de34f336170d85554fbe7875acce0ff51464724ee +export AWS_ACCESS_KEY_ID=GK458f9d7315fc6c9686c41045 +export AWS_DEFAULT_REGION="garage" +export AWS_ENDPOINT_URL="http://localhost:3900" diff --git a/devserver/.gitignore b/devserver/.gitignore new file mode 100644 index 0000000..9d2ae43 --- /dev/null +++ b/devserver/.gitignore @@ -0,0 +1,2 @@ +garageMetadata/ +garageData/ diff --git a/devserver/README.md b/devserver/README.md new file mode 100644 index 0000000..71e79bf --- /dev/null +++ b/devserver/README.md @@ -0,0 +1,7 @@ +All services for running a Linstrom dev server can be found in the docker compose file + +Garage (s3 provider) isn't fully setup in the compose file, see [https://garagehq.deuxfleurs.fr/documentation/quick-start/] +for a guide on setting it up + +If you don't want to install the garage app on your system, you can use the one in +the container via `docker exec -it devserver-s3-1 /garage ` diff --git a/docker-compose.yml b/devserver/docker-compose.yml similarity index 57% rename from docker-compose.yml rename to devserver/docker-compose.yml index 4c77209..44dfd91 100644 --- a/docker-compose.yml +++ b/devserver/docker-compose.yml @@ -13,3 +13,15 @@ services: retries: 10 ports: - 5432:5432 + s3: + image: dxflrs/garage:v1.0.1 + volumes: + - ./garageData:/data + - ./garageMetadata:/meta + - ./garage.toml:/etc/garage.toml + ports: + - 3900:3900 + - 3901:3901 + - 3902:3902 + - 3903:3903 + - 3904:3904 diff --git a/devserver/garage.toml b/devserver/garage.toml new file mode 100644 index 0000000..586d7e2 --- /dev/null +++ b/devserver/garage.toml @@ -0,0 +1,27 @@ +metadata_dir = "/meta" +data_dir = "/data" +db_engine = "sqlite" + +replication_factor = 1 + +rpc_bind_addr = "[::]:3901" +rpc_public_addr = "127.0.0.1:3901" +rpc_secret = "d5942e8b48413716b3b1a0d87ac1bc483d9c9a8b4c7157429b13b8c97772c0e1" + +[s3_api] +s3_region = "garage" +api_bind_addr = "[::]:3900" +root_domain = ".s3.garage.localhost" + +[s3_web] +bind_addr = "[::]:3902" +root_domain = ".web.garage.localhost" +index = "index.html" + +[k2v_api] +api_bind_addr = "[::]:3904" + +[admin] +api_bind_addr = "[::]:3903" +admin_token = "T6CSqke6GY83vJg7saH1LEh2CUnuLvlbTps1Tn1F3ag=" +metrics_token = "Yp+O2QtgC6+MGhrD8jqmCzSvntsMkyfZa0dxs7bI7hY=" diff --git a/devserver/linstrom.toml b/devserver/linstrom.toml new file mode 100644 index 0000000..a29cd6c --- /dev/null +++ b/devserver/linstrom.toml @@ -0,0 +1,42 @@ +[general] + protocol = "http" + domain = "localhost" + private_port = 8080 + +[ssl] + handle_ssl = false + +[admin] + username = "server-admin" + first_time_setup_otp = "Example otp password" + profiling_password = "Example profiling password" + +[webauthn] + display_name = "Linstrom" + +[storage] + host = "localhost" + username = "linstrom" + password = "linstrom" + db_name = "linstrom" + port = 5432 + ssl_mode = "disable" + time_zone = "Europe/Berlin" + max_in_memory_cache_size = 1000000 + max_in_memory_cache_ttl = 5 + +[mail] + host = "localhost" + port = 587 + username = "linstrom" + password = "linstrom" + +[self] + server_actor_display_name = "Server actor" + server_display_name = "Linstrom" + +[s3] + key_id = "GK458f9d7315fc6c9686c41045" + secret = "b6d1c8ec97052b8a40ae953de34f336170d85554fbe7875acce0ff51464724ee" + region = "garage" + endpoint = "http://localhost:3900"