-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Fix docker-compose.yml (#291)"
This reverts commit a475e97.
- Loading branch information
1 parent
a475e97
commit 5a8e7d2
Showing
10 changed files
with
125 additions
and
55 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
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
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,52 @@ | ||
# This file is not designed to be used a lone, but | ||
# As an addition to './docker-compose.yml' ex: 'docker-compose -f ./docker-compose.yml -f ./docker-compose.deploy.yml up -d' | ||
version: "3" | ||
networks: | ||
traefik: | ||
external: true | ||
hilfling-network: # Used for internal networking | ||
|
||
services: | ||
postgres: | ||
labels: | ||
- traefik.enable=false | ||
|
||
hilfling-backend: | ||
container_name: hilfling-backend | ||
image: fotogjengen/hilfling-backend | ||
volumes: | ||
- ./static-files/:/app/static-files/ | ||
depends_on: | ||
- postgres | ||
- fg-blob-storage | ||
ports: | ||
- 8484:8080 | ||
expose: | ||
- 8080 | ||
networks: | ||
- traefik | ||
- hilfling-network | ||
environment: | ||
DATABASE_USERNAME: $DATABASE_USERNAME | ||
DATABASE_PASSWORD: $DATABASE_PASSWORD | ||
DATABASE_URL: "jdbc:postgresql://postgres:5432/hilflingdb" #"jdbc:postgresql://postgres:5432/hilflingdb?createDatabaseIfNotExist=true" | ||
|
||
labels: | ||
- traefik.enable=true | ||
- traefik.http.routers.hilfling-backend.entrypoints=web # <== Defining the entrypoint for http, **ref: line 30 | ||
- traefik.http.routers.hilfling-backend.entrypoints=websecure # <== Defining the entrypoint for http, **ref: line 30 | ||
- traefik.http.routers.hilfling-backend.rule=Host(`fg-backend.nikzy.no`) # <== Your Domain Name goes here for the http rule | ||
- traefik.http.routers.hilfling-backend.tls.certresolver=lets-encr # Adds SSL to App | ||
- traefik.docker.network=traefik | ||
|
||
fg-static: | ||
#image: fotogjengen/hilfling-static # Don't need to push this to a registry | ||
networks: | ||
- traefik | ||
labels: | ||
- traefik.enable=true | ||
- traefik.http.routers.hilfling-rontend.entrypoints=web # <== Defining the entrypoint for http, **ref: line 30 | ||
- traefik.http.routers.hilfling-static.entrypoints=websecure # <== Defining the entrypoint for http, **ref: line 30 | ||
- traefik.http.routers.hilfling-static.rule=Host(`fg-static.nikzy.no`) # <== Your Domain Name goes here for the http rule | ||
- traefik.http.routers.hilfling-static.tls.certresolver=lets-encr # Adds SSL to App | ||
|
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
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 |
---|---|---|
@@ -1,47 +1,71 @@ | ||
version: '3.7' | ||
# This file uses environment variables | ||
# to override any settings add a file called '.env' | ||
# with new environment variable values | ||
# example: "DATABASE_USERNAME=NikZy" | ||
version: "3" | ||
networks: | ||
hilfling-network: # Used for internal networking | ||
|
||
volumes: | ||
db-data: # Data volume for the database | ||
|
||
services: | ||
app: | ||
container_name: hilfling-app | ||
ports: | ||
- "8000:8000" | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
networks: | ||
- hilfling-network | ||
depends_on: | ||
- postgres | ||
environment: | ||
DATABASE_HOST: postgres | ||
DATABASE_USERNAME: hilfling | ||
DATABASE_PASSWORD: password | ||
DATABASE_NAME: hilflingdb | ||
DATABASE_PORT: 5432 | ||
|
||
postgres: | ||
container_name: hilflingdb | ||
build: | ||
context: . | ||
dockerfile: postgres/Dockerfile | ||
restart: always | ||
networks: | ||
- hilfling-network | ||
volumes: | ||
- "db-data:/var/lib/postgresql/data" # Database volume | ||
#- "./postgres/sql:/base-sql" # Think this was init sql schema? | ||
expose: | ||
- 5432 | ||
networks: | ||
- hilfling-network | ||
ports: | ||
- "5432:5432" | ||
environment: | ||
POSTGRES_USER: hilfling # Use POSTGRES_USER instead of DATABASE_USERNAME | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: hilflingdb # Specify the default database | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
# Use env variable if exists, fallback to hilfling | ||
POSTGRES_USER: ${DATABASE_USERNAME:-hilfling} | ||
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-password} | ||
LISTENING_PORT: ${LISTENING_PORT-8080} | ||
|
||
networks: | ||
hilfling-network: | ||
driver: bridge | ||
pgadmin: | ||
container_name: pgadmin | ||
image: dpage/pgadmin4 | ||
restart: always | ||
environment: | ||
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-admin@admin.com} | ||
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-password} | ||
ports: | ||
- ${PGADMIN_PORT:-5050}:80 | ||
networks: | ||
- hilfling-network | ||
|
||
volumes: | ||
db-data: | ||
fg-static: | ||
container_name: hilfling-static | ||
#image: fotogjengen/hilfling-static # Don't need to push this to a registry | ||
build: | ||
context: ./static-files | ||
dockerfile: Dockerfile | ||
environment: | ||
NGINX_HOST: ${NGINX_HOST:-fg-static.nikzy.no} | ||
NGINX_PORT: ${NGINX_PORT:-80} | ||
ports: | ||
- 8383:${NGINX_PORT:-80} | ||
volumes: | ||
- ./static-files/static/:/usr/share/nginx/html | ||
|
||
fg-blob-storage: | ||
container_name: hilfling-blob-storage | ||
image: mcr.microsoft.com/azure-storage/azurite | ||
volumes: | ||
- ./static-files/blob_storage/:/data | ||
restart: always | ||
networks: | ||
- hilfling-network | ||
ports: | ||
- "10000:10000" | ||
- "10001:10001" | ||
- "10002:10002" |
Empty file.
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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
FROM postgres:12 | ||
MAINTAINER FG Web (fg-web@samfundet.no) | ||
|
||
ENV POSTGRES_DB hilflingdb | ||
|
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
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