Skip to content

Commit

Permalink
Make dev setup locally usablei
Browse files Browse the repository at this point in the history
  • Loading branch information
FloThinksPi committed Jul 5, 2023
1 parent 73423a9 commit 4fbb4c8
Show file tree
Hide file tree
Showing 15 changed files with 343 additions and 675 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
RUN wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - \
&& echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list \
&& apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install postgresql-client postgresql-client-common mariadb-client cf7-cli -y \
&& apt-get install -o Dpkg::Options::="--force-overwrite" cf8-cli -y \
&& apt-get install postgresql-client postgresql-client-common mariadb-client -y \
# && apt-get install -o Dpkg::Options::="--force-overwrite" cf8-cli -y \
&& gem install cf-uaac \
&& wget $(curl -s https://api.github.com/repos/cloudfoundry/credhub-cli/releases/latest | \
jq -r '.assets[] | select(.name|match("credhub-linux.*")) | .browser_download_url') -O credhub.tar.gz \
Expand Down
79 changes: 65 additions & 14 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
version: '3'

version: "3.8"
name: "cloud_controller-dev"
services:

# Dev Container
codespace:
container_name: codespace
container_name: devcontainer
build:
context: ../
dockerfile: .devcontainer/Dockerfile
Expand All @@ -13,55 +14,96 @@ services:
- ..:/workspace:cached
- /var/run/docker.sock:/var/run/docker.sock
networks:
- codespace
- cloud_controller-dev-network
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined

# Postgres
postgres:
container_name: postgres
image: postgres:13
environment:
POSTGRES_PASSWORD: supersecret
ports:
- "5432:5432"
networks:
- codespace
- cloud_controller-dev-network
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
# Postgres

# Mariadb
mariadb:
container_name: mariadb
image: mariadb:10.3
environment:
MARIADB_ROOT_PASSWORD: supersecret
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 10s
timeout: 20s
retries: 3
networks:
- codespace
- cloud_controller-dev-network
restart: unless-stopped

# UAA
uaa:
container_name: uaa
build:
context: library/uaa
dockerfile: Dockerfile
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/info"]
interval: 30s
timeout: 20s
retries: 3
networks:
- codespace
- cloud_controller-dev-network
restart: unless-stopped

# Minio
minio:
container_name: minio
image: minio/minio:latest
command: minio server --address :9001 /data
command: minio server --address ":9001" "/data"
ports:
- "9001:9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9001/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
networks:
- codespace
- cloud_controller-dev-network
restart: unless-stopped

# CATS Configurable Service Broker
catsbroker:
container_name: catsbroker
build:
context: library/catsbroker
dockerfile: Dockerfile
ports:
- "9292:9292"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9292/v2/catalog"]
interval: 30s
timeout: 20s
retries: 3
networks:
- codespace
- cloud_controller-dev-network
restart: unless-stopped

# Nginx
nginx:
container_name: nginx
Expand All @@ -70,10 +112,19 @@ services:
dockerfile: Dockerfile
args:
ENABLED_MODULES: nginx_upload_module
ports:
- "80:80"
- "443:443"
healthcheck:
test: ["CMD-SHELL", "wget -O /dev/null http://localhost || exit 1"]
interval: 5s
timeout: 10s
retries: 3
networks:
- codespace
- cloud_controller-dev-network
volumes:
- ./library/nginx/conf:/usr/local/nginx/conf:ro
- ../tmp:/tmp:cached
- ../tmp:/tmp

networks:
codespace:
cloud_controller-dev-network:
8 changes: 0 additions & 8 deletions .devcontainer/library/idea/.idea/.gitignore

This file was deleted.

15 changes: 0 additions & 15 deletions .devcontainer/library/idea/.idea/libraries/app_packager_zips.xml

This file was deleted.

14 changes: 0 additions & 14 deletions .devcontainer/library/idea/.idea/libraries/fixtures.xml

This file was deleted.

44 changes: 0 additions & 44 deletions .devcontainer/library/idea/.idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .devcontainer/library/idea/.idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .devcontainer/library/idea/.idea/vcs.xml

This file was deleted.

Loading

0 comments on commit 4fbb4c8

Please sign in to comment.