Fix empty images section if no images + Remove postgres port

This commit is contained in:
Ahmed Al-Taiar
2024-10-17 20:46:34 -04:00
parent 7973663b2a
commit cbf75acbeb
3 changed files with 21 additions and 22 deletions

View File

@ -21,7 +21,7 @@ services:
- API_PROXY_TARGET=http://localhost:8911
- MAX_HTTP_CONNECTIONS_PER_MINUTE=60
- SESSION_SECRET=super_secret_session_key_change_me_in_production_please
- DATABASE_URL=postgresql://redwood:changeme@db:5432/portfolio
- DATABASE_URL=postgresql://redwood:changeme@db/portfolio
- FIRST_NAME=first name # Your first name
- LAST_NAME=lastname # Your last name
- SMTP_HOST=smtp.example.com
@ -58,8 +58,6 @@ services:
- POSTGRES_USER=redwood
- POSTGRES_PASSWORD=changeme
- POSTGRES_DB=portfolio
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql/data
@ -75,9 +73,9 @@ sudo docker exec -u root portfolio chown -R node:node /home/node/app/api/files_p
## Logging In
- Once the container is up and running, head to `/login` (`https://portfolio.example.com/login`), default credentials are below
- If you would like to change the password, head to `/forgot-password` (`https://portfolio.example.com/forgot-password`), the username is `admin`
- If you correctly set up the Gmail app password, you should receive an email from yourself
- It contains the link needed to change your password
- If you correctly configured [SMTP](#smtp), you should receive an Email from [`EMAIL_FROM`](#docker-compose) to [`EMAIL_TO`](#docker-compose)
- The Email contains the link needed to change your password
### Default Credentials
**Username:** `admin`
**Password:** [`SMTP_PASSWORD`](#smtp)
**Password:** [`SMTP_PASSWORD`](#docker-compose)

View File

@ -9,7 +9,7 @@ services:
- API_PROXY_TARGET=http://localhost:8911
- MAX_HTTP_CONNECTIONS_PER_MINUTE=60
- SESSION_SECRET=super_secret_session_key_change_me_in_production_please
- DATABASE_URL=postgresql://redwood:changeme@db:5432/portfolio
- DATABASE_URL=postgresql://redwood:changeme@db/portfolio
- FIRST_NAME=first name # Your first name
- LAST_NAME=lastname # Your last name
- SMTP_HOST=smtp.example.com
@ -46,8 +46,6 @@ services:
- POSTGRES_USER=redwood
- POSTGRES_PASSWORD=changeme
- POSTGRES_DB=portfolio
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql/data

View File

@ -69,10 +69,13 @@ const Project = ({ project }: Props) => {
</div>
</>
)}
{project.images.length > 0 && (
<h2 className="sm:hidden font-bold text-3xl text-center">Images</h2>
)}
</div>
<div className="flex flex-wrap gap-4 items-center pt-8 justify-center">
{project.images.map((image, i) => (
<div className="flex flex-wrap gap-4 pt-8 justify-center h-fit">
{project.images.length > 0 &&
project.images.map((image, i) => (
<a
href={image}
target="_blank"