-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break up Docker Compose files into dev and production versions
- Loading branch information
1 parent
3de3e32
commit 5627f37
Showing
3 changed files
with
81 additions
and
64 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,75 @@ | ||
services: | ||
# Container for web app | ||
web: | ||
build: . | ||
depends_on: | ||
- postgres | ||
- nginx-proxy-acme | ||
restart: unless-stopped | ||
networks: | ||
- nginx-proxy | ||
- database | ||
environment: | ||
DATABASE_URL: postgresql://taxes_app:dev_pwd@postgres:5432/taxes?schema=public | ||
VIRTUAL_HOST: ponou.unibuc.ro | ||
LETSENCRYPT_HOST: ponou.unibuc.ro | ||
|
||
# Container for NGINX reverse proxy | ||
nginx-proxy: | ||
image: nginxproxy/nginx-proxy:latest | ||
restart: unless-stopped | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
volumes: | ||
- nginx-certs:/etc/nginx/certs | ||
- nginx-vhost:/etc/nginx/vhost.d | ||
- nginx-html:/usr/share/nginx/html | ||
- /var/run/docker.sock:/tmp/docker.sock:ro | ||
networks: | ||
- nginx-proxy | ||
labels: | ||
- com.github.nginx-proxy.nginx | ||
environment: | ||
TRUST_DOWNSTREAM_PROXY: false | ||
|
||
# ACME companion for NGINX, for automatical TLS certificate generation | ||
nginx-proxy-acme: | ||
image: nginxproxy/acme-companion:latest | ||
restart: unless-stopped | ||
depends_on: | ||
- nginx-proxy | ||
volumes: | ||
- nginx-certs:/etc/nginx/certs | ||
- nginx-vhost:/etc/nginx/vhost.d | ||
- nginx-html:/usr/share/nginx/html | ||
- /etc/acme.sh | ||
- /var/run/docker.sock:/var/run/docker.sock:ro | ||
networks: | ||
- nginx-proxy | ||
environment: | ||
DEFAULT_EMAIL: [email protected] | ||
|
||
# Database container | ||
postgres: | ||
image: postgres:16.1 | ||
expose: | ||
- 5432 | ||
environment: | ||
POSTGRES_USER: taxes_app | ||
POSTGRES_PASSWORD: dev_pwd | ||
POSTGRES_DB: taxes | ||
volumes: | ||
- db-data:/var/lib/postgresql/data | ||
networks: | ||
- database | ||
|
||
volumes: | ||
nginx-certs: | ||
nginx-vhost: | ||
nginx-html: | ||
db-data: | ||
|
||
networks: | ||
nginx-proxy: | ||
database: |
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,75 +1,14 @@ | ||
services: | ||
# Container for web app | ||
web: | ||
build: . | ||
depends_on: | ||
- postgres | ||
- nginx-proxy-acme | ||
restart: unless-stopped | ||
networks: | ||
- nginx-proxy | ||
- database | ||
environment: | ||
DATABASE_URL: postgresql://taxes_app:dev_pwd@postgres:5432/taxes?schema=public | ||
VIRTUAL_HOST: ponou.unibuc.ro | ||
LETSENCRYPT_HOST: ponou.unibuc.ro | ||
|
||
# Container for NGINX reverse proxy | ||
nginx-proxy: | ||
image: nginxproxy/nginx-proxy:latest | ||
restart: unless-stopped | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
volumes: | ||
- nginx-certs:/etc/nginx/certs | ||
- nginx-vhost:/etc/nginx/vhost.d | ||
- nginx-html:/usr/share/nginx/html | ||
- /var/run/docker.sock:/tmp/docker.sock:ro | ||
networks: | ||
- nginx-proxy | ||
labels: | ||
- com.github.nginx-proxy.nginx | ||
environment: | ||
TRUST_DOWNSTREAM_PROXY: false | ||
|
||
# ACME companion for NGINX, for automatical TLS certiifcate generation | ||
nginx-proxy-acme: | ||
image: nginxproxy/acme-companion:latest | ||
restart: unless-stopped | ||
depends_on: | ||
- nginx-proxy | ||
volumes: | ||
- nginx-certs:/etc/nginx/certs | ||
- nginx-vhost:/etc/nginx/vhost.d | ||
- nginx-html:/usr/share/nginx/html | ||
- /etc/acme.sh | ||
- /var/run/docker.sock:/var/run/docker.sock:ro | ||
networks: | ||
- nginx-proxy | ||
environment: | ||
DEFAULT_EMAIL: [email protected] | ||
|
||
# Database container | ||
postgres: | ||
image: postgres:16.1 | ||
expose: | ||
- 5432 | ||
ports: | ||
- 5432:5432 | ||
environment: | ||
POSTGRES_USER: taxes_app | ||
POSTGRES_PASSWORD: dev_pwd | ||
POSTGRES_DB: taxes | ||
volumes: | ||
- db-data:/var/lib/postgresql/data | ||
networks: | ||
- database | ||
|
||
volumes: | ||
nginx-certs: | ||
nginx-vhost: | ||
nginx-html: | ||
db-data: | ||
|
||
networks: | ||
nginx-proxy: | ||
database: |
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,9 +1,12 @@ | ||
import { Suspense } from "react"; | ||
import SignInButton from "./SignInButton"; | ||
|
||
export default async function SignInPage() { | ||
return ( | ||
<div> | ||
<SignInButton /> | ||
<Suspense> | ||
<SignInButton /> | ||
</Suspense> | ||
</div> | ||
); | ||
} |