Skip to content

Commit

Permalink
Merge pull request #10 from Adoptaunpeludo/s3_file_upload
Browse files Browse the repository at this point in the history
S3 file upload
  • Loading branch information
JoseAlbDR authored Feb 15, 2024
2 parents 98afb1a + e06dc0b commit fc3c11b
Show file tree
Hide file tree
Showing 44 changed files with 3,577 additions and 365 deletions.
17 changes: 15 additions & 2 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ NODE_ENV=development

PORT=3000

//* Database
DB_PASSWORD=1234
DB_NAME=AUP-db
DB_HOST=localhost
DB_PORT=5433
DB_USERNAME=postgres
DATABASE_URL="postgresql://postgres:1234@localhost:5432/AUP-db"

JWT_SEED=secret

DATABASE_URL="postgresql://postgres:1234@localhost:5432/AUP-db"

//* Email service (no longer needed with microservice)
MAILER_SERVICE=
MAILER_EMAIL=
MAILER_SECRET_KEY=
Expand All @@ -21,3 +22,15 @@ MAILER_SECRET_KEY=
//* For email generated links, usually the front end url
WEBSERVICE_URL=http://localhost:3000


//* Qeue broker
RABBITMQ_USER=dsadsi21neoU@N!D
RABBITMQ_PASS=Y98213KQSNDKJASKDLJNka
# RABBITMQ_URL=amqp://dsadsi21neoU@N!D:Y98213KQSNDKJASKDLJNka@rabbitmq
RABBITMQ_URL=amqp://dsadsi21neoU@N!D:Y98213KQSNDKJASKDLJNka@localhost

//* S3 bucket info to upload images
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=
AWS_BUCKET=
84 changes: 42 additions & 42 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,46 +47,46 @@ services:
MAILER_SECRET_KEY: ${MAILER_SECRET_KEY}
WEB_SERVICE_URL: ${WEB_SERVICE_URL}

aup-backend:
build: .
restart: on-failure
depends_on:
rabbitmq:
condition: service_healthy
container_name: aup-backend
ports:
- ${PORT}:${PORT}
environment:
NODE_ENV: ${NODE_ENV}
PORT: ${PORT}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_USERNAME: ${DB_USERNAME}
JWT_SEED: ${JWT_SEED}
DATABASE_URL: ${DATABASE_URL}
MAIL_SERVICE: ${MAIL_SERVICE}
MAILER_EMAIL: ${MAILER_EMAIL}
MAILER_SECRET_KEY: ${MAILER_SECRET_KEY}
WEBSERVICE_URL: ${WEBSERVICE_URL}
RABBITMQ_USER: ${RABBITMQ_USER}
RABBITMQ_PASS: ${RABBITMQ_PASS}
RABBITMQ_URL: ${RABBITMQ_URL}
# aup-backend:
# build: .
# restart: on-failure
# depends_on:
# rabbitmq:
# condition: service_healthy
# container_name: aup-backend
# ports:
# - ${PORT}:${PORT}
# environment:
# NODE_ENV: ${NODE_ENV}
# PORT: ${PORT}
# DB_PASSWORD: ${DB_PASSWORD}
# DB_NAME: ${DB_NAME}
# DB_HOST: ${DB_HOST}
# DB_PORT: ${DB_PORT}
# DB_USERNAME: ${DB_USERNAME}
# JWT_SEED: ${JWT_SEED}
# DATABASE_URL: ${DATABASE_URL}
# MAIL_SERVICE: ${MAIL_SERVICE}
# MAILER_EMAIL: ${MAILER_EMAIL}
# MAILER_SECRET_KEY: ${MAILER_SECRET_KEY}
# WEBSERVICE_URL: ${WEBSERVICE_URL}
# RABBITMQ_USER: ${RABBITMQ_USER}
# RABBITMQ_PASS: ${RABBITMQ_PASS}
# RABBITMQ_URL: ${RABBITMQ_URL}

proxy:
build: ./nginx
depends_on:
- aup-backend
container_name: aup-backend-proxy
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf:ro
- ./nginx/passwd/:/etc/nginx/passwd:ro
- ./nginx/letsencrypt/:/etc/letsencrypt/:ro
- ./nginx/certificates/certs/:/etc/nginx/certs:ro
- ./nginx/certificates/private/:/etc/nginx/private:ro
- ./nginx/logs/:/var/log/nginx/
# proxy:
# build: ./nginx
# depends_on:
# - aup-backend
# container_name: aup-backend-proxy
# restart: always
# ports:
# - 80:80
# - 443:443
# volumes:
# - ./nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf:ro
# - ./nginx/passwd/:/etc/nginx/passwd:ro
# - ./nginx/letsencrypt/:/etc/letsencrypt/:ro
# - ./nginx/certificates/certs/:/etc/nginx/certs:ro
# - ./nginx/certificates/private/:/etc/nginx/private:ro
# - ./nginx/logs/:/var/log/nginx/
Loading

0 comments on commit fc3c11b

Please sign in to comment.