diff --git a/.gitignore b/.gitignore index 76dfcf4..42c7061 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ go_build_trikotwaschliste +/.idea diff --git a/.idea/workspace.xml b/.idea/workspace.xml index ecbc92e..70906af 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,13 +2,7 @@ - - - - - - \ No newline at end of file diff --git a/docker-compose_dev.yml b/docker-compose_dev.yml new file mode 100644 index 0000000..1ae7dad --- /dev/null +++ b/docker-compose_dev.yml @@ -0,0 +1,71 @@ +version: '3.1' + +services: + pgadmin: + image: dpage/pgadmin4 + environment: + PGADMIN_DEFAULT_EMAIL: test@schoff.it + PGADMIN_DEFAULT_PASSWORD: example + restart: always + volumes: + - pgadmin-data:/var/lib/pgadmin + labels: + - "traefik.enable=true" + # http (with redirect) + - "traefik.http.routers.pgadmin_http.entrypoints=web" + - "traefik.http.routers.pgadmin_http.rule=Host(`pgadmin.dev.duckduckfuck.com`)" + - "traefik.http.routers.pgadmin_http.middlewares=https_redirect" + + # https + - "traefik.http.routers.pgadmin_https.rule=Host(`pgadmin.dev.duckduckfuck.com`)" + - "traefik.http.routers.pgadmin_https.entrypoints=websecure" + - "traefik.http.routers.pgadmin_https.tls.certresolver=letsencrypt" + - "traefik.http.services.pgadmin_https.loadbalancer.server.port=80" + + networks: + #- shared-traefik + - shared-pgadmin + + web: + build: . + restart: always + labels: + - "traefik.enable=true" + # http (with redirect) + - "traefik.http.routers.goapi_http.entrypoints=web" + - "traefik.http.routers.goapi_http.rule=Host(`goapi.dev.duckduckfuck.com`)" + - "traefik.http.routers.goapi_http.middlewares=https_redirect" + + # https + - "traefik.http.routers.goapi_https.rule=Host(`goapi.dev.duckduckfuck.com`)" + - "traefik.http.routers.goapi_https.entrypoints=websecure" + - "traefik.http.routers.goapi_https.tls.certresolver=letsencrypt" + - "traefik.http.services.goapi_https.loadbalancer.server.port=8082" + networks: + #- shared-traefik + - shared-web + + postgres-db: + image: postgres:11.6 + restart: always + ports: + - "8081:5432" + environment: + POSTGRES_USER: web + POSTGRES_PASSWORD: example + volumes: + - postgres-data:/var/lib/postgresql/data + networks: + - shared-pgadmin + - shared-web + +volumes: + postgres-data: + pgadmin-data: + +networks: + shared-web: + #shared-traefik: + # external: + # name: shared-traefik + shared-pgadmin: