-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from m-ildefons/74-docker-compose
feature: add docker-compose file
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
version: "3.4" | ||
services: | ||
s3gw: | ||
image: ghcr.io/aquarist-labs/s3gw:latest | ||
restart: always | ||
command: | ||
- "--rgw-backend-store" | ||
- "sfs" | ||
ports: | ||
- "7480:7480" | ||
environment: | ||
RGW_DEFAULT_USER_ACCESS_KEY: "test" | ||
RGW_DEFAULT_USER_SECRET_KEY: "test" | ||
volumes: | ||
- data:/data | ||
|
||
s3gw-ui: | ||
image: ghcr.io/aquarist-labs/s3gw-ui:latest | ||
restart: always | ||
stop_signal: SIGINT | ||
depends_on: | ||
- s3gw | ||
ports: | ||
- "8080:8080" | ||
environment: | ||
RGW_SERVICE_URL: "http://localhost:3080" | ||
|
||
proxy: | ||
image: docker.io/nginx:latest | ||
restart: always | ||
depends_on: | ||
- s3gw-ui | ||
ports: | ||
- "80:80" | ||
- "3080:3080" | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro | ||
|
||
volumes: | ||
data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
server { | ||
listen 80; | ||
server_name s3gw-ui-proxy; | ||
|
||
location / { | ||
proxy_pass http://s3gw-ui:8080/; | ||
} | ||
} | ||
|
||
server { | ||
listen 3080; | ||
server_name s3gw-proxy; | ||
|
||
location / { | ||
|
||
if ($request_method = 'OPTIONS') { | ||
add_header 'Access-Control-Max-Age' 1728000; | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
add_header 'Access-Control-Allow-Headers' '*'; | ||
add_header 'Access-Control-Allow-Methods' 'DELETE,GET,HEAD,POST,PUT'; | ||
add_header 'Content-Type' 'application/json'; | ||
add_header 'Content-Length' 0; | ||
return 204; | ||
} | ||
|
||
add_header 'Access-Control-Allow-Origin' '*' always; | ||
add_header 'Access-Control-Allow-Headers' '*' always; | ||
add_header 'Access-Control-Allow-Methods' 'DELETE,GET,HEAD,POST,PUT' always; | ||
|
||
proxy_pass http://s3gw:7480/; | ||
} | ||
} |