Skip to content

Commit

Permalink
Merge pull request #12 from devgateway/main-OCNANDI-11
Browse files Browse the repository at this point in the history
OCNANDI-11 Collision between spring Jackson2ObjectMapperBuilder beans…
  • Loading branch information
mpostelnicu authored Oct 30, 2023
2 parents 29cbdd6 + 6d42aa9 commit e04ee15
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 13 deletions.
64 changes: 64 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
version: '3.8'

services:

app:
image: ocportal-nandi/admin/prod:${TAG-local}
restart: always
extra_hosts:
- "host.docker.internal:host-gateway" #required so docker connects to host interface (this is for sending emails)
build:
target: prod
depends_on:
- db
- mongo
ports:
- "8090:8090"
- "8000:8000"
env_file:
- .env

db:
image: postgis/postgis:11-3.3
restart: 'no'
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
env_file:
- .env

mongo:
image: mongo:4.2
restart: 'no'
command: [--auth]
volumes:
- mongodata:/data/db
ports:
- "27017:27017"
env_file:
- .env

pgbackups:
image: prodrigestivill/postgres-backup-local
restart: 'no'
volumes:
- /opt/pgbackups:/backups
env_file:
- .env
depends_on:
- db
environment:
- POSTGRES_HOST=db
- POSTGRES_DB=ocportal
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- SCHEDULE=@daily
- BACKUP_KEEP_DAYS=30
- BACKUP_KEEP_WEEKS=12
- BACKUP_KEEP_MONTHS=24
- HEALTHCHECK_PORT=5432

volumes:
pgdata:
mongodata:
15 changes: 5 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:

app:
image: ocportal-nandi/admin/prod:${TAG-local}
restart: 'no'
restart: always
extra_hosts:
- "host.docker.internal:host-gateway" #required so docker connects to host interface (this is for sending emails)
build:
Expand All @@ -13,35 +13,30 @@ services:
- db
- mongo
ports:
- "8090:8090"
- "8000:8000"
- "127.0.0.1:8090:8090"
env_file:
- .env

db:
image: postgis/postgis:11-3.3
restart: 'no'
restart: always
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
env_file:
- .env

mongo:
image: mongo:4.2
restart: 'no'
restart: always
command: [--auth]
volumes:
- mongodata:/data/db
ports:
- "27017:27017"
env_file:
- .env

pgbackups:
image: prodrigestivill/postgres-backup-local
restart: 'no'
restart: always
volumes:
- /opt/pgbackups:/backups
env_file:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.convert.ReadingConverter;
Expand Down Expand Up @@ -44,7 +45,8 @@
* @author mpostelnicu
*/
@SpringBootApplication
@ComponentScan("org.devgateway")
@ComponentScan(value = "org.devgateway", excludeFilters = @ComponentScan.Filter(
type = FilterType.ASPECTJ, pattern = "org.devgateway.jocds.ValidatorConfiguration" ))
@PropertySource("classpath:/org/devgateway/toolkit/persistence/mongo/application.properties")
@EnableCaching
public class MongoPersistenceApplication {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.context.annotation.Profile;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
Expand All @@ -46,7 +47,8 @@
@EnableTransactionManagement
@EntityScan(basePackageClasses = {GenericPersistable.class})
@PropertySource("classpath:/org/devgateway/toolkit/persistence/application.properties")
@ComponentScan("org.devgateway.toolkit")
@ComponentScan(value = "org.devgateway.toolkit", excludeFilters = @ComponentScan.Filter(
type = FilterType.ASPECTJ, pattern = "org.devgateway.jocds.ValidatorConfiguration" ))
@EnableConfigurationProperties({OnfonMediaProperties.class, DgFmProperties.class})
public class PersistenceApplication {
private static final Logger logger = LoggerFactory.getLogger(PersistenceApplication.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.context.annotation.PropertySource;

/**
Expand All @@ -25,7 +26,9 @@

@SpringBootApplication(exclude = {EmbeddedMongoAutoConfiguration.class})
@PropertySource("classpath:/org/devgateway/toolkit/web/application.properties")
@ComponentScan("org.devgateway.toolkit")
@ComponentScan(value = "org.devgateway.toolkit", excludeFilters = @ComponentScan.Filter(
type = FilterType.ASSIGNABLE_TYPE,
value = org.devgateway.jocds.ValidatorConfiguration.class))
public class WebApplication {

private static final Logger logger = LoggerFactory.getLogger(WebApplication.class);
Expand Down

0 comments on commit e04ee15

Please sign in to comment.